Skip to content
Daniel Wirtz edited this page Apr 18, 2018 · 18 revisions

What exactly is AssemblyScript?

AssemblyScript compiles a strictly-typed subset of TypeScript (a typed superset of JavaScript) to WebAssembly ahead of time (see: Limitations). It's not really a language on its own, though it provides several new WebAssembly-specific types and built-ins, but rather a compiler-variant for the same thing that integrates with Binaryen, Emscripten's WebAssembly backend, instead.

It's both possible to write portable code that compiles to WebAssembly using asc and JavaScript using tsc, as well as close-to-the-metal WebAssembly.

Integrating with Binaryen provides rich validation, optimization (for size and/or speed) and output (WebAssembly text and binary format, asm.js, source maps) capabilities on top of that.