Skip to content

Releases: dtolnay/cxx

1.0.61

31 Dec 22:14
1.0.61
8aa54e6
Compare
Choose a tag to compare
  • Add String::lossy constructors to C++ API, corresponding to from_utf8_lossy and from_utf16_lossy (#984, thanks @benesch)
  • Add Vec<T>::truncate to C++ API (#988, thanks @benesch)
  • Assert sufficient alignment of const char16_t* passed to a rust::String constructor (#992)

1.0.60

10 Dec 21:42
1.0.60
719fc25
Compare
Choose a tag to compare
  • Optimize the Debug and Display impl of CxxString to eliminate memory allocation (#979)
  • Prevent handwritten panicking Drop, PartialEq, PartialOrd, or Hash trait impls from causing UB when called from C++ (#980)
  • Add support for codebases that choose to opt in to elided_lifetimes_in_paths lint (#907, #981)

1.0.59

09 Dec 12:20
1.0.59
314d9ab
Compare
Choose a tag to compare
  • Add clear() member function to rust::Vec<T> in C++ (#951, thanks @rookboom)

1.0.58

08 Dec 00:52
1.0.58
34d73d6
Compare
Choose a tag to compare
  • no_std mode (#969, #970, #971, #972, #973, #974, #975)

    [dependencies]
    cxx = { version = "1.0", default-features = false, features = ["alloc"] }

    A no_alloc mode is also implemented but is not stable yet in this release.

    [dependencies]
    cxx = { version = "1.0", default-features = false }

1.0.57

01 Dec 07:21
1.0.57
0854ef7
Compare
Choose a tag to compare
  • Apply --cxx-impl-annotations also to the functions underlying UniquePtr and similar builtin bindings (#967, thanks @adetaylor)

1.0.56

05 Oct 20:51
1.0.56
4c49873
Compare
Choose a tag to compare
  • Pass through doc(hidden) attributes inside the bridge module (#945)

1.0.55

24 Sep 18:52
1.0.55
ac98b54
Compare
Choose a tag to compare
  • Fix build script race causing "Failed to create symlink ... File exists (os error 17)" in cxx_build (#938)

1.0.54

27 Aug 20:48
1.0.54
fccef86
Compare
Choose a tag to compare
  • Enable C++ to reserve and read capacity on a rust::String (#924)

  • Enable Rust to reserve capacity on a CxxString (#925)

    This is important in APIs that connect bytes-based code in Rust to std::string-based code in C++.

    use bytes::Buf;
    use cxx::let_cxx_string;
    
    fn thing(buf: &mut dyn Buf) {
        let_cxx_string!(string = "");
    
        // handled by helper:
        string.as_mut().reserve(buf.remaining());
        while buf.remaining() > 0 {
            let chunk = buf.chunk();
            string.as_mut().push_bytes(chunk);
            buf.advance(chunk.len());
        }
    
        ffi::thing(string);
    }
    
    // ffi::thing:
    // void thing(std::string& s) {
    //   WriteMessage msg{std::move(s)};
    //   ...
    // }

1.0.53

26 Aug 21:38
1.0.53
a23d0ec
Compare
Choose a tag to compare
  • Prevent lint inside generated C++ code in projects that build with -Wshadow (#919, thanks @isg)

1.0.52

12 Aug 21:26
1.0.52
8dfba30
Compare
Choose a tag to compare
  • Add method to clear a C++ std::string from Rust (#912)