https://github.com/inokawa/rust-wasm-example
Some examples of WebAssembly generated by Rust.
https://github.com/inokawa/rust-wasm-example
Last synced: about 1 month ago
JSON representation
Some examples of WebAssembly generated by Rust.
- Host: GitHub
- URL: https://github.com/inokawa/rust-wasm-example
- Owner: inokawa
- Created: 2020-05-24T08:38:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-15T20:12:32.000Z (almost 2 years ago)
- Last Synced: 2025-02-12T22:45:29.408Z (8 months ago)
- Language: Rust
- Homepage: https://inokawa.github.io/rust-wasm-example/
- Size: 48.9 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust-wasm-example

Some examples of WebAssembly generated by Rust.
#### mod_c
Porting C to wasm.
#### rs_audio
Audio synthesis with wasm.
#### rs_image
Image processing with wasm.
#### rs_text
Morphological analysis with wasm.
#### rs_zip
File compression with wasm.
## Demo
https://inokawa.github.io/rust-wasm-example/
## Setup
requirements
- rust
- cargo
- target `wasm32-unknown-unknown` is used to compile
- node
- npm
- clang
- needed to compile C```sh
npm install
```## How to run in debug mode
```sh
# Builds the project and opens it in a new browser tab. Auto-reloads when the project changes.
npm start
```## How to build in release mode
```sh
# Builds the project and places it into the `dist` folder.
npm run build
```## How to run unit tests
```sh
# Runs tests in Firefox
npm test -- --firefox# Runs tests in Chrome
npm test -- --chrome# Runs tests in Safari
npm test -- --safari
```