Generate Javascript bindings for whistle

Quickstart

install

deno install -Afq --unstable -n whistle_bindgen https://raw.githubusercontent.com/load1n9/whistle_bindgen/main/cli.ts

test.whi

builtin @core { proc_exit }

export fn exit(code: i32): none {
    proc_exit(code)
}

export fn main(): none {}

compile

whistle_bindgen ./test.whi ./test.js

Usage

import { load, exit} from "./test.js";

await load();

console.log("should print");
exit();
console.log("shouldn't print");