AssemblyScript compiles a typed JavaScript variant to WebAssembly through Binaryen. It targets WASM specifically and installs via npm.
Overview
AssemblyScript is a language that resembles TypeScript and compiles to WebAssembly. The toolchain turns JavaScript with types into lean WebAssembly modules, using Binaryen in the pipeline.
The language is built for WebAssembly’s feature set, so authors keep low-level control while using familiar TypeScript-style syntax. That similarity is meant to lower the barrier to writing WASM without adopting an entirely new language.
It hooks into the existing web toolchain: you can add it with npm rather than assembling a large custom build setup. The project also documents integration with wasm-opt through its Binaryen-based build.
Examples on the site show typical exported functions, and the ecosystem lists projects built with AssemblyScript. Community support includes Discord channels for announcements and help.
Key features
- Compiles typed JavaScript to WebAssembly
- Uses Binaryen for code generation
- TypeScript-like syntax
- npm-based installation
- WebAssembly-specific language design
- wasm-opt integration via Binaryen
- Optional runtime stub mode
- Low-level WASM control
Use cases
- Shipping small WebAssembly builds
- Writing WASM without a new syntax
- Web projects needing performant modules
- Direct WebAssembly intrinsics when needed