Work still in progress
Experimenting with adding C++ lib back to Rust extension for NodeJS addon.
What's inside:
- C++ static library ./lib/mylib.cc
- Rust dynamic library in ./src/embed.rs (linked with mylib.cc)
- Native NodeJS C++ addon ./src/addon.cc using ./src/embed.rs library
See more general Rust in node examples here: https://github.com/andruhon/rust-in-node-examples
> npm install > npm run build
> node index.js
On windows it is not really possible to embed node extensions compiled with GCC back into NodeJS, because NodeJS for Windows is compiled with MSVC and addons should be compiled and linked with MSVC as well. So it is not possible to use custom build script which uses gcc crate for ths purpose.
- Tests
- More docs