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 close-to-the-metal WebAssembly as well as portable code that compiles to WebAssembly using asc and JavaScript using tsc. As the syntax is just TypeScript, existing tooling can be used in development as well (e.g. for syntax highlighting and refactoring) and common code can easily be shared between the two compilers.

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.

 

Clone this wiki locally