Skip to content

Files

This branch is 33 commits behind AssemblyScript/assemblyscript:main.

src

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Apr 25, 2023
Oct 23, 2022
Nov 3, 2023
Nov 17, 2023
Oct 23, 2022
Apr 14, 2023
Mar 21, 2022
Jan 24, 2023
Mar 21, 2022
Jul 31, 2023
Apr 22, 2023
Nov 8, 2023
Nov 17, 2023
Jul 31, 2023
Dec 22, 2022
Mar 21, 2022
Apr 22, 2023
Mar 21, 2022
Nov 3, 2023
Nov 2, 2023
Nov 17, 2023
Nov 17, 2023
Jan 12, 2023
Nov 7, 2023
Oct 1, 2023
Mar 21, 2022

Compiler

Portable compiler sources that compile to both JavaScript using tsc and WebAssembly using asc.

Architecture

Usage

import assemblyscript from "assemblyscript";
...

Building

Building to JavaScript

To build the compiler, run:

npm run build

The rebuild automatically when there are changes, do:

npm run watch

Building to WebAssembly

To build the compiler to a WebAssembly binary, run:

npm run bootstrap

Uses the AssemblyScript compiler compiled to JavaScript to compile itself to WebAssembly, building to WebAssembly again using itself compiled to WebAssembly. Builds to build/. Performs a git diff to make sure that both the initial and the final artifacts are the same. Note that this builds the compiler as a library, while the asc frontend setting it up and feeding it source files is JavaScript for now.

Running asc with the WebAssembly variant:

asc [options...] --wasm build/assemblyscript.release-bootstrap.js

Running the compiler tests with the WebAssembly variant:

npm run test:compiler -- --wasm build/assemblyscript.release-bootstrap.js