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.;
// use WASM module
wasmLib.;
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