Electron + Rust. Hides Rust source in the packaged Electron project. Only the dll is used.
- Yarn
npm i -g yarn - Cargo Make
cargo install cargo-make
yarnwill download required node packages.cargo buildwill download and build the rust source.cargo make copy_libwill copy the library into the resources folder*./node_modules/.bin/electron-rebuildwill build against the right npm packages for your Electron's version of Node..\node_modules\.bin\electron-rebuild.cmdfor Windows.yarn startwill start the app.yarn run distwill package your app with Electron Builder.
You only need to run electron-rebuild when you add a new npm package. More info: https://github.com/electron/electron-rebuild
*To build Rust source and copy the library at the same time, you can use cargo make dbuild. Edit Makefile.toml and Cargo.toml to suit your platform. See the Cargo Make docs: https://sagiegurari.github.io/cargo-make/
