wasm.md 559 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
# WebAssembly support

There is a WebAssembly version of the interpreter which can run in modern
browsers and standalone JavaScript shells.

**TODO**: in the future, this will be used in [iTasks][] to achieve sharing of
tasks between a server and a browser client.

## Tools

Camil Staps's avatar
Camil Staps committed
11
Because there is no WebAssembly parser one needs to use `bcprelink` to produce
12 13 14 15
a version of the bytecode which can readily be copied into WebAssembly's linear
memory. This is done with:

```bash
Camil Staps's avatar
Camil Staps committed
16
bcprelink MODULE.bc -o MODULE.ubc
17 18 19
```

**TODO**: add support to `cpm`/the IDE for this.