Registry / devops / wasm-grate

wasm-grate

JSON →
library0.3.2jsnpmunverified

WASM-grate is a development tool that analyzes JavaScript and TypeScript codebases to identify functions and modules that are good candidates for migration to WebAssembly. It currently supports function declarations, expressions, and arrow functions, assigning a complexity score to help prioritize optimization efforts. The latest version is 0.3.2, and the project is in early development (pre-1.0.0) with a CLI for scanning files or directories. It is designed for front-end performance workflows, differentiating from generic profilers by focusing specifically on WebAssembly migration opportunities. Release cadence is irregular as it is still evolving.

npm install wasm-grate
INSTALL
IMPORT
SIG · WASM-GRATE
W
wasm-grate
devopsjavascriptv0.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLI
npx wasm-grate --path src/
import { wasmGrate } from 'wasm-grate'
Package is a CLI tool, not a library. Use via npx or global install.
default
npx wasm-grate
const wasmGrate = require('wasm-grate')
No programmatic API exported. Only CLI usage.

Scans a TypeScript file for WebAssembly migration candidates using the WASM-grate CLI.

npx wasm-grate -p src/components/Report/Feed/helpers.ts
Debug
Known issues
gotchaWASM-grate is pre-1.0.0 and not production-ready. Output may be incomplete or inaccurate.
fix
Wait for version 1.0.0 or test thoroughly before relying on results.
affects: <=0.3.2
deprecatedThe --path flag is used, but some documentation shows -path (single hyphen). Always use --path or -p.
fix
Use --path <path> or -p <path>.
affects: >=0.0.0
Errors
Common errors & fixes
ERROR: Could not read file: /path/to/file
Invalid path or permissions.
fix
Ensure the path exists and is readable: ls -la /path/to/file
Error: Unsupported syntax at line X
WASM-grate only supports function declarations, expressions, and arrow functions.
fix
Check if the file contains class methods or generator functions; those are not analyzed.
Upgrade
Version history
0.3.2latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
wasm-grate — npm install wasm-grate · libregistry