🍝 edoN 🍜
Embed Node.js within Rust
Embed the fully featured Nodejs runtime into your Rust application!
Features:
- Bindings for
libnode - Native Nodejs extensions via standard napi bindings
- Support for worker threads
Todo:
- (help wanted) Build Nodejs statically and link/vendor it into the crate to allow creation of portable single binary outputs
- Deno backend behind
deno_backendfeature - Bun backend behind
bun_backendfeature - Quickjs backend behind
quickjs_backendfeature
Usage
Simple Example
Native Extensions
Libnode Shared Library
My end goal is that edon is installed via crates.io and be used without any additional downloads or fragile configurations. It should be turn-key & batteries included.
I have plans to compile libnode to a statically linked library and vendor it within the crate however I have made a few attempts at building Node.js this way without success. If anyone has experience with building Node.js or has experience vendoring static libraries in Rust crates - PRs, issues, discussions are welcome!
However, currently the libnode.so / libnode.dylib / libnode.dll must be downloaded from the Github releases and placed next to the executable. Alternatively the path to the shared library can be specified via the EDON_LIBNODE_PATH variable.