11 stable releases
1.1.9 | Oct 3, 2022 |
---|---|
1.1.8 | Sep 20, 2022 |
1.1.6 | May 25, 2022 |
1.1.0 | Apr 27, 2022 |
#295 in WebAssembly
26 downloads per month
5KB
template-wasm-rust-library
Project template for a Rust library compiled to WASM.
Project Template Usage
- Use as a template to create a new repository.
- Update links and references in
README.md
.
ESM Dependency Usage
import * as wasmLib from "https://flowscripter.github.io/template-wasm-rust-library/flowscripter_template_wasm_rust_library.js";
// init WASM module
await wasmLib.default();
// use WASM module
wasmLib.add(2, 2);
Development
Install wasm-pack: cargo install wasm-pack
Install Firefox
Build: wasm-pack build --target web
Test: cargo test && wasm-pack test --headless --firefox
Lint: cargo fmt
Documentation
Overview
classDiagram
Foo <|-- Bar
API
Link to auto-generated API docs for the library:
License
MIT © Flowscripter
Dependencies
~0.7–1.4MB
~28K SLoC