inokawa / rust-wasm-example

Some examples of WebAssembly generated by Rust.

Home Page:https://inokawa.github.io/rust-wasm-example/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

rust-wasm-example

deploy

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
npm install

How to run in debug mode

# 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

# Builds the project and places it into the `dist` folder.
npm run build

How to run unit tests

# Runs tests in Firefox
npm test -- --firefox

# Runs tests in Chrome
npm test -- --chrome

# Runs tests in Safari
npm test -- --safari

About

Some examples of WebAssembly generated by Rust.

https://inokawa.github.io/rust-wasm-example/


Languages

Language:Rust 50.3%Language:JavaScript 47.0%Language:HTML 2.1%Language:C 0.6%