Comments (1)
This isn't something I plan to tackle in the near term, but I do have some loose plans for how we will expose customization of the mapping between the languages. Codebases that use the different error approaches from your links, or that use exceptions, will want a Rust Result
value to turn into somewhat different code coming out of our C++ code generator. Relatedly, codebases that use a nonstandard string type will want some way to get smooth interop with that on the Rust side.
There is more design work to do, but I'd like for this stuff to not be built as special cases in this project. Instead such customization would be exposed in a sort of plugin mechanism where the codegen behavior is defined by a Rust procedural macro or something like that, and all our native types for which we ship support out of the box would be implemented through that same mechanism.
Then for something like Leaf/Outcome it would be a matter of someone writing the procedural macro that implements the understanding of how to operate on those types, putting it on crates.io, and then we register the dependency in Cargo.toml and use its types in our FFI signatures.
from cxx.
Related Issues (20)
- Writing tests with CXX code causes linker issues
- Nonlocal extern "Rust" types trick in #942 doesn't work with Boxed types
- Raw identifiers in methods in extern "C++" block leads to wrong C++ code generation
- cxx::bridge behind a feature HOT 1
- Proposal: Implement Panic-to-Exception Handling Mode on FFI Boundary (Seeking Feedback)
- Can't figure out proper shim for UniquePtr instead of returning global singleton
- Compilation Issue: Linking to std in no_std Environment
- Compiling cdylib HOT 1
- Is it possible to mark a C++ type as `Trivial`? HOT 2
- Question: estimate workload to call functions from geogram HOT 1
- Returning `CxxString` from Rust to C++ HOT 5
- Extern C++ Enums HOT 5
- Advice/example on docs.rs strategy HOT 2
- Feature Request: Add support for nested Vector types HOT 1
- Building two CXX C++ bindings with the same symbols but in different namespaces. HOT 2
- Including bridge from another crate
- Error in configuring crates_universe when included as a Bazel module
- Error compiling `cxx.cc` on Windows HOT 1
- Proposal: implementing native C++ std::error_code
- Link failure when using CXX-backed function from another crate HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cxx.