1 unstable release
0.4.0 | Oct 26, 2023 |
---|---|
0.3.0 |
|
0.2.0 |
|
0.1.0 |
|
#613 in WebAssembly
225KB
6.5K
SLoC
wasmrepl
Since Web Assembly's text format is close to Lisp, maybe an attempt to a REPL prompt is in order!
Demo:
Caveats
- This REPL is not strictly built according to Wasm spec. Some rules are relaxed to make it easy to use within a REPL prompt. For example, the prompt acts as the inside of a Wasm
func
, so you can do, say an(i32.const 12)
. However, unlike the inside of a Wasmfunc
, you can also define a newfunc
on the prompt. - We don’t have full coverage of all features of Wasm yet. What is covered is documented here. If you would like to see a particular feature implemented, please feel free to open an issue. Or a PR.
Installation
To install, follow the below command,
$ cargo install wasmrepl
To check if installation is complete,
$ wasmrepl
>>
It should give you the REPL prompt. To exit the prompt, use Ctrl+D.
How to use
Some examples on how to use this is added in the blog post here.
Dependencies
~6.5MB
~122K SLoC