11 个稳定版本
1.1.9 | 2022 年 10 月 3 日 |
---|---|
1.1.8 | 2022 年 9 月 20 日 |
1.1.6 | 2022 年 5 月 25 日 |
1.1.0 | 2022 年 4 月 27 日 |
255 在 WebAssembly 中
每月 26 次下载
5KB
template-wasm-rust-library
将 Rust 库编译为 WASM 的项目模板。
项目模板使用方法
- 将其用作 模板 创建新的仓库。
- 更新
README.md
中的链接和参考。
ESM 依赖使用
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);
开发
安装 wasm-pack: cargo install wasm-pack
安装 Firefox
构建: wasm-pack build --target web
测试: cargo test && wasm-pack test --headless --firefox
代码风格检查: cargo fmt
文档
概述
classDiagram
Foo <|-- Bar
API
链接到库的自动生成 API 文档
许可证
MIT © Flowscripter
依赖项
~0.7–1.4MB
~29K SLoC