Skip to content
A minimal Electron + WebAssembly (WASM) + πŸ¦€ Rust example.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Added some WASM! Apr 9, 2019
.gitignore Added some WASM! Apr 9, 2019
.jsbeautifyrc Formatted using js-beautify. Apr 12, 2019
Cargo.lock Upgraded Rust dependencies. Apr 12, 2019
Cargo.toml Upgraded Rust dependencies. Apr 12, 2019
LICENSE-APACHE
LICENSE-MIT Added some WASM! Apr 9, 2019
README.md Updated wasm-bindgen-cli version in the README. Apr 12, 2019
build.ps1 Add PowerShell build script. Apr 10, 2019
build.sh Added some WASM! Apr 9, 2019
index.html Added a link in index.html to issue #6. Apr 12, 2019
main.js Removed some empty lines. Apr 12, 2019
main_module.js Formatted using js-beautify. Apr 12, 2019
package-lock.json Formatted using js-beautify. Apr 12, 2019
package.json Updated package name and window background color. Apr 11, 2019
preload.js
style.css Updated package name and window background color. Apr 11, 2019

README.md

electron-wasm-rust-example

A minimal Electron + WebAssembly (WASM) + Rust example.

This example application is based on:

Prerequisites:

  • Install Rust
  • Add the WASM target, rustup target add wasm32-unknown-unknown
  • Install wasm-bindgen, the same version as in Cargo.toml, cargo install -f --version 0.2.42 wasm-bindgen-cli
  • Install Node.js & NPM
  • Install Electron, npm install electron --save-dev, https://electronjs.org/docs/tutorial/installation

Building

Use the build.sh or build.ps1 script to build the WebAssembly module.

Running the app during development

npm start

Packaging

TODO: Depend on and add scripts(?) for https://github.com/electron-userland/electron-builder, see issue #7.

You can’t perform that action at this time.