A minimal Electron + WebAssembly (WASM) + Rust example.
This example application is based on:
- https://gist.github.com/jarek-foksa/0f6e82bdaf8fb1962c9e14035a8725e4
- https://github.com/rustwasm/wasm-bindgen/tree/master/examples/without-a-bundler
- https://github.com/anderejd/wasm-bindgen-minimal-example
- Install Rust https://www.rust-lang.org/
- Add the WASM target,
rustup target add wasm32-unknown-unknown - Install wasm-bindgen, the same version as in this Cargo.toml,
cargo install -f --version 0.2.47 wasm-bindgen-cli
- Install Node.js & NPM
- Clone this repository
git clone [email protected]:anderejd/electron-wasm-rust-example.git - Enter the new directory
cd electron-wasm-rust-example - Download/install npm dependencies (Electron) for this example,
npm installhttps://electronjs.org/docs/tutorial/installation
Use the build.sh or build.ps1 script to build the WebAssembly module.
npm start
TODO: Depend on and add scripts(?) for https://github.com/electron-userland/electron-builder, see issue #7.
