@flowscripter/template-bun-wasm-rust-library
v1.3.5
Published
Project template for a Rust library compiled to WASM exposed as a Bun module
Maintainers
Readme
template-bun-wasm-rust-library
Project template for a Rust library compiled to WASM exposed as a Bun module.
Template Usage
Create a new Bun project using this as a template:
bun create @flowscripter/template-bun-wasm-rust-library
Bun Module Usage
Add the module:
bun add @flowscripter/template-bun-wasm-rust-library
Use the module:
import { world } from "@flowscripter/template-bun-wasm-rust-library";
world();Development
Install wasm-pack:
cargo install wasm-pack
Install dependencies:
bun install
Build WASM/JS/types (produces dist/ for Node.js and TypeScript consumers; Bun uses raw source directly):
bun run build
Build JS/types (produces dist/ for Node.js and TypeScript consumers; Bun uses raw source directly):
bun run build
Test:
cargo test && bun test
Format:
bunx oxfmt
Lint:
cargo fmt && bunx oxlint index.ts src/ tests/
Generate HTML API documentation:
bunx typedoc index.ts
Documentation
Overview
Sample mermaid diagram to test rendering in markdown:
classDiagram
Foo <|-- BarAPI
Link to auto-generated API docs:
License
MIT © Flowscripter
