Compiler

Create ready to use binary from source files

Installation

With NPM:

$ npm i @rapid-lang/compiler -g

To run compiler you will need Node 12 or newer. Go to https://nodejs.org/en/download/ to get installation files.

Example usage

Compiles file.rapid and outputs app.wasm with sourcemaps ready to be run in browser.

$ rapid-compiler file.rapid -o app.wasm -s

API

Commands:
  index.js source  Path to source file to be compiled

Options:
  -o, --output      Path to result file to be saved          [string] [required]
  -h, --help        Show help                                          [boolean]
  -v, --version     Show version number                                [boolean]
  -s, --sourceMaps  Generate sourceMaps for debugging                  [boolean]
  -t, --textFormat  Generate WebAssembly Text Format (wat) file         [string]
  -p, --port        Sourcemaps default port                             [number]

Last updated

Was this helpful?