github dtolnay/cxx 1.0.173

latest releases: 1.0.175, 1.0.174
5 days ago
  • Allow static associated functions with the same name on different Self types (#1585)
  • Deprecate extern shared struct syntax in favor of ExternType impl (#1586)
    + use cxx::ExternType;
    +
    + #[repr(C)]
    + pub struct Struct {
    +     ...
    + }
    +
    + unsafe impl ExternType for Struct {
    +     type Id = cxx::type_id!("path::to::Struct");
    +     type Kind = cxx::kind::Trivial;
    + }
    +
      #[cxx::bridge]
      pub mod ffi {
    -     struct Struct {
    -         ...
    -     }
    -
          #[namespace = "path::to"]
    -     unsafe extern "C++" {
    +     extern "C++" {
              include!("...");
    
    -         type Struct;
    +         type Struct = crate::Struct;
          }
      }

Don't miss a new cxx release

NewReleases is sending notifications on new releases.