Files
regorus/bindings/wasm/building.md
Anand Krishnamoorthi 761d11ef48 Document bindings (#119)
* Instructions for WASM/JS binding

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>

* Document Python, WASM/JS bindings

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>

---------

Signed-off-by: Anand Krishnamoorthi <anakrish@microsoft.com>
2024-02-01 13:47:27 -08:00

577 B

  • Install wasm-pack

    cargo install wasm-pack
    
  • Build regorusjs for nodejs.

    cd bindings/wasm
    wasm-pack build --target nodejs --release
    
  • Install nodejs

  • Run the test script

    $ node test.js
    \\{
    \\  "result": [
    \\    {
    \\      "expressions": [
    \\        {
    \\          "value": "Hello, World!",
    \\          "text": "data.test.message",
    \\          "location": {
    \\            "row": 1,
    \\            "col": 1
    \\          }
    \\        }
    \\      ]
    \\    }
    \\   ]
    \\}