github dtolnay/cxx 0.5.8

latest releases: 1.0.122, 1.0.121, 1.0.120...
3 years ago
  • Support #[namespace = "..."] attribute on extern blocks (#444)

    An item will inherit the namespace specified on its surrounding extern block if any, otherwise the namespace specified with the top level cxx::bridge attribute.

    #[cxx::bridge(namespace = "third_priority")]
    mod ffi {
        #[namespace = "second_priority"]
        extern "Rust" {
            fn f();
    
            #[namespace = "first_priority"]
            fn g();
        }
    
        extern "Rust" {
            fn h();
        }
    }

    The above would result in functions ::second_priority::f, ::first_priority::g, ::third_priority::h.

Don't miss a new cxx release

NewReleases is sending notifications on new releases.