Comments (5)
@dtolnay What's the plan for solving this?
You are going to use std::function?
Can I help with the implementation?
from cxx.
@dtolnay What's the plan for solving this? You are going to use std::function? Can I help with the implementation?
Do you have any progress about this?
I want this feature, and as cxx not support it, so I have to use
#[no_mangle]
extern "C" fn register_callback(extern "C" fn(c_int)) {
todo!()
}
to register function pointer(with specific function signature) on a static memory, and in Rust call the callback
Can I do something for support this feature? @dtolnay and this design is ok?
from cxx.
Here's a pattern to use std::function
with current cxx facilities.
from cxx.
Passing function pointers from Rust to C++ was implemented in #79 + #85. It remains to implement passing the reverse direction.
from cxx.
Here's a pattern to use
std::function
with current cxx facilities.I used this, but it does not support dynamic libraries, can you give me a hand, tks!!
Undefined symbols for architecture arm64: "_cn$rongcloud$cxxbridge1$MyFunction$call", referenced from: imlib::ffi::MyFunction::call::hb153764149e230b4 in imlib.4dg0tx688zy81d57.rcgu.o
from cxx.
Related Issues (20)
- 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 HOT 6
- 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
- Unsupported element type of Vec<[u64; 3]>
- How to include C++ files whose directory is given by an environment variable? HOT 1
- Error compiling demo to wasm on macOS HOT 5
- Is there a way to expose a C++ class that is itself a wrapper on `std::shared_ptr`?
- How can I `include!` a file in OUT_DIR
- How can I return a vector of non-trivial type of C++ to Rust?
- LNK2019 unresolved symbol for Vec<SharedStruct> using MSVC
- Using CXX in multiple DLLs always results in undefined behavior?
- Does the core safety claim need rephrasing? HOT 6
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.