Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anderejd/electron-wasm-rust-example
A minimal Electron + WebAssembly (WASM) + 🦀 Rust example.
https://github.com/anderejd/electron-wasm-rust-example
electron example rust wasm-bindgen webassembly
Last synced: 2 months ago
JSON representation
A minimal Electron + WebAssembly (WASM) + 🦀 Rust example.
- Host: GitHub
- URL: https://github.com/anderejd/electron-wasm-rust-example
- Owner: anderejd
- License: apache-2.0
- Created: 2019-04-09T22:13:23.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T21:42:03.000Z (about 2 years ago)
- Last Synced: 2024-08-03T17:22:11.161Z (6 months ago)
- Topics: electron, example, rust, wasm-bindgen, webassembly
- Language: JavaScript
- Size: 120 KB
- Stars: 289
- Watchers: 7
- Forks: 17
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
electron-wasm-rust-example
==========================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-exampleRust setup
----------1. Install Rust
1. Add the WASM target, `rustup target add wasm32-unknown-unknown`
1. Install wasm-bindgen, the __same version__ as in this [Cargo.toml](Cargo.toml), `cargo install -f --version 0.2.47 wasm-bindgen-cli`NPM setup
---------1. Install Node.js & NPM
1. Clone this repository `git clone [email protected]:anderejd/electron-wasm-rust-example.git`
1. Enter the new directory `cd electron-wasm-rust-example`
1. Download/install npm dependencies (Electron) for this example, `npm install`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 , see issue [#7].
[#7]: https://github.com/anderejd/electron-wasm-rust-example/issues/7