Watch
1
Fork
You've already forked wasm
0
an opinionated tool to build wasm+ts bindings.
  • TypeScript 100%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-21 08:10:34 +02:00
.forgejo/workflows refactor: bundle using tsdown 2026-07-20 18:47:29 +02:00
src chore: add more logging 2026-07-19 20:02:53 +02:00
.gitignore chore: initialize 2026-07-19 19:47:02 +02:00
bun.lock refactor: bundle using tsdown 2026-07-20 18:47:29 +02:00
package.json chore: release v0.1.0 2026-07-20 18:47:49 +02:00
README.md docs: add more information 2026-07-21 08:10:34 +02:00
tsconfig.json chore: initialize 2026-07-19 19:47:02 +02:00
tsdown.config.ts refactor: bundle using tsdown 2026-07-20 18:47:29 +02:00

Features

A ton of tweaks is applied to the bundle made by wasm-pack.

  • Embedded WASM in the JS bundle
  • No need to execute any init() function to load the WASM
  • Simplified DTS and removed wasm-pack noise
  • package.json generated using Cargo.toml properties

Requirements

You should have the following tools globally available.

Usage

Once you've set up the registry, you can call the CLI from npx.

npx @mentor/wasm@latest

You should see the final results in an exported directory. You can directly upload this directory to npm as a package.

Keys in Cargo.toml

You can customize the output by updating your Cargo.toml of your WASM crate.

[package.metadata.npm]
name = "@unilim/cas" # name of your package

If you're using external npm dependencies you can also define them here.

[package.metadata.npm.dependencies]
"@unilim/cas" = "^3.0.0"