An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# rust-wasm-example

![deploy](https://github.com/inokawa/rust-wasm-example/workflows/deploy/badge.svg?branch=master)

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
```