Hacker GitHub

← All repos

dtolnay/cxx

View on GitHub ↗ ★ 6,857 Rust

Safe interop between Rust and C++

22 mentions on Hacker News by 18 people: 3 stories, 19 comments · first 2020-01-08 · latest 2024-05-21

Mentions per year 22 mentions · busiest year 2020 (12)
20082026
  1. …More "real world" examples are dtolnay's CXX for Rust and C++ interop: https://github.com/dtolnay/cxx and my own ones (sorry to link these again, but I do not know of any others): C++ with Vcpkg: https://github.com/Release-Candid
    comment by ReleaseCandidat · 2024-05-21 · in Enlightenmentware
  2. Chromium is fairly invested in cxx[0]. Firefox could do the same if they haven't already. [0]: https://github.com/dtolnay/cxx
  3. I have a non-toy multi-language project in https://github.com/dtolnay/cxx for which I have both Buck2 and Bazel build rules. On my machine `buck2 clean && time buck2 build :cxx` takes 6.2 seconds. `bazel clean && time bazel build :cxx`…
    comment by dtolnay · 2023-04-06 · in Buck2: Our open source build system
  4. …the Rust lib to Python, so C++ <=> Rust <=> Python , but it was indeed fun to implement it all. https://github.com/dtolnay/cxx
    comment by rajman187 · 2022-11-14 · in Rust and C++ Interoperability
  5. …library in Rust. While there isn't an official Rust port, I just used the library along with CXX ( https://github.com/dtolnay/cxx ) with a simple geospatial struct.
  6. …restrict unsafety to trusting C++ code to be sound, without the risk of screwing up the bindings): https://github.com/dtolnay/cxx and https://cxx.rs/ . However, creating bindings without typing out `unsafe` was a controversial issue,…
    comment by nyanpasu64 · 2021-05-06 · in The Rustonomicon
  7. Isn't this what the cxx project is aiming to do? https://github.com/dtolnay/cxx
    comment by daypay · 2021-04-13 · in Rust is for Professionals
  8. ▲ 183
    CXX - Safe interop between Rust and C++
    story by dgellow · 2021-03-24 · 32 comments
  9. ▲ 2
    CXX – safe FFI between Rust and C++
    story by bobrenjc93 · 2021-02-19 · 0 comments
  10. …they were using C apis - exposing Rust to C and vice versa is relatively straight-forward. [1] https://github.com/dtolnay/cxx
  11. See https://github.com/dtolnay/cxx as an example of the kind of things people are building to explore this space.
    comment by steveklabnik · 2020-12-17 · in State of Rust Survey 2020 results
  12. …make it compatible with Rust Strings/Vectors/etc. [0] https://github.com/rust-lang/rust-bindgen [1] https://github.com/dtolnay/cxx
  13. https://github.com/dtolnay/cxx#builtin-types
  14. See https://github.com/dtolnay/cxx/issues/1 for some of this debate.
  15. …(mentioned in chromium's original post[2]) [0]: https://news.ycombinator.com/item?id=24211691 [1]: https://github.com/dtolnay/cxx [2]: https://www.chromium.org/Home/chromium-security/memory-safet...
  16. …away your unsafe usage to one spot per function. Isn't that what they did? Through the use of https://github.com/dtolnay/cxx Agreed the article expressed the concern in a rather clumsy manner, but they seem to have a point for their…
  17. …internally and/or in generated macro code. This is good documentation on the safety of the library: https://github.com/dtolnay/cxx#safety
    comment by bluejekyll · 2020-08-19 · in Rust and C++ Interoperability in Chrome
  18. …depending on the direction of interop. These tools don't provide the safety guarantees of https://github.com/dtolnay/cxx but the also both predate cxx and C++ doesn't have much in terms of safety guarantees to begin with so the bar is…
    comment by muizelaar · 2020-08-19 · in Rust and C++ Interoperability in Chrome
  19. > I wonder if we could ever get direct Rust to C++ FFI https://github.com/dtolnay/cxx/ exists and works well AFAIK. That's what Chromium ( https://chromium-review.googlesource.com/q/project:experimen... ) and others use.
  20. …rest of it is in C++ or Rust. That's the approach that Chronium [2] is experimenting with. [1] - https://github.com/dtolnay/cxx/ [2] - https://chromium-review.googlesource.com/q/project:experimen...
  21. This crate was actually announced a few days ago. https://github.com/dtolnay/cxx
    comment by mlindner · 2020-01-10 · in Translating Quake 3 into Rust
  22. ▲ 7
    Safe FFI Between Rust and C++
    story by gfs · 2020-01-08 · 0 comments