Skip to content

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

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

anderejd/electron-wasm-rust-example

Repository files navigation

electron-wasm-rust-example

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

This example application is based on:

Rust setup

  1. Install Rust https://www.rust-lang.org/
  2. Add the WASM target, rustup target add wasm32-unknown-unknown
  3. Install wasm-bindgen, the same version as in this Cargo.toml, cargo install -f --version 0.2.47 wasm-bindgen-cli

NPM setup

  1. Install Node.js & NPM
  2. Clone this repository git clone git@github.com:anderejd/electron-wasm-rust-example.git
  3. Enter the new directory cd electron-wasm-rust-example
  4. Download/install npm dependencies (Electron) for this example, npm install https://electronjs.org/docs/tutorial/installation

Build the Rust code into WASM

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

Run the app during development

npm start

Packaging the application for end-users

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

About

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

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published