flowscripter_template_wasm_rust_library

Crates.ioflowscripter_template_wasm_rust_library
lib.rsflowscripter_template_wasm_rust_library
version1.1.9
sourcesrc
created_at2022-04-26 14:06:18.581315
updated_at2022-10-03 16:54:06.651034
descriptionProject template for a Rust library compiled to WASM.
homepagehttps://github.com/flowscripter
repositoryhttps://github.com/flowscripter/template-wasm-rust-library
max_upload_size
id575405
size5,830
(vectronic)

documentation

README

template-wasm-rust-library

version build coverage dependencies rust doc license: MIT

Project template for a Rust library compiled to WASM.

Project Template Usage

  1. Use as a template to create a new repository.
  2. 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:

API Documentation

License

MIT © Flowscripter

Commit count: 154

cargo fmt