wasmasc
AssemblyScript WebAssembly plugin for Wasmrun - compile AssemblyScript projects to WebAssembly with support for both direct asc compilation and npm/pnpm/yarn/bun build workflows.
Installation
As a Wasmrun Plugin (Recommended)
Wasmrun will automatically detect AssemblyScript projects and prompt you to install this plugin if needed.
From Source
From Crates.io
Usage
Via Wasmrun (Recommended)
Standalone CLI (Experimental)
Project Structure
Supports standard AssemblyScript project layouts:
Dependencies
Required
asc- AssemblyScript compiler (npm install -g asc)node- Node.js runtime
Optional (Package Managers)
The plugin intelligently detects and uses your preferred package manager:
npm- Default Node.js package manageryarn- Fast, reliable package manager (detected viayarn.lock)pnpm- Efficient, disk space saving package manager (detected viapnpm-lock.yaml)bun- Fast JavaScript runtime with bundled npm alternative (detected viabun.lockb)
If none are explicitly locked, the plugin falls back to npm.
Capabilities
- ✅ Direct ASC Compilation - Compile
.tsfiles to WebAssembly using asc - ✅ npm/yarn/pnpm/bun Support - Automatic package manager detection
- ✅ Optimization Levels - Debug, Release, and Size optimizations
- ✅ Project Auto-detection - Recognizes AssemblyScript projects automatically
- ✅ Live Reload - Supports file watching during development
- ❌ Web App Packaging - Not applicable for AssemblyScript
Examples
Basic Compilation
Development with Watching
With Custom Output
Troubleshooting
"asc command not found"
Install the AssemblyScript compiler globally:
"No package manager found"
Install at least one of: npm, yarn, pnpm, or bun
Plugin not detected
Ensure your project has one of:
"asc"or"@asc"inpackage.jsonassembly/index.tsorassembly/main.ts.tsfiles in the project
WASM Plugin Architecture
This plugin is part of the Wasmrun plugin ecosystem. All plugins follow the same FFI-based architecture for dynamic loading and can be updated independently.
This plugin implements the Wasm plugin interface and reads its configuration from Cargo.toml. The configuration includes:
- Extensions: File extensions the plugin handles
- Entry Files: Priority order for entry point detection
- Capabilities: What features the plugin supports
- Dependencies: Required external tools