dcodeIO 6b459259f9 Add memoryBase compiler option
This allows having fixed-size application-specific memory in front, followed by compiler-generated static memory and the heap.
2018-02-17 00:16:08 +01:00
..
asc
2018-02-12 19:17:50 +01:00
2018-02-17 00:16:08 +01:00
2018-02-17 00:16:08 +01:00

Compiler frontend for node.js

Usage

For an up to date list of available command line options, see:

$> asc --help

API

The API accepts the same options as the CLI but also lets you override stdout and stderr and/or provide a callback. Example:

const asc = require("assemblyscript/bin/asc.js");
asc.main([
  "myModule.ts",
  "-b", "myModule.wasm",
  "-O",
  "--sourceMap",
  "--measure"
], {
  stdout: process.stdout,
  stderr: process.stderr
}, function(err) {
  if (err)
    throw err;
  ...
});

Available command line options can also be obtained programmatically:

const options = require("assemblyscript/bin/asc.json");
...