Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Browser SDK

An SDK to use the AssemblyScript compiler on the web. This is built to distribution files using the exact versions of the compiler and its dependencies.

Expects require.js (or compatible) on the web, primarily targeting WebAssembly Studio. Note that consuming the source file in this directory directly does not solve any versioning issues - use dist/sdk.js instead. Do not try to bundle this.

Exports

  • binaryen
    The version of binaryen required by the compiler.

  • long
    The version of long.js required by the compiler.

  • assemblyscript
    The AssemblyScript compiler as a library.

  • asc
    AssemblyScript compiler frontend that one will interact with (see).

Example usage

require(
  ["https://cdn.jsdelivr.net/npm/assemblyscript@latest/dist/sdk"],
  function(sdk) {
    const { asc } = sdk;
    asc.ready.then(() => {
      asc.main(...);
    });
  }
);

There is also the SDK example showing how to compile some actual code.