wasmrepl

Crates.iowasmrepl
lib.rswasmrepl
version0.4.0
sourcesrc
created_at2023-09-19 05:35:06.725914
updated_at2023-10-26 15:40:48.907817
descriptionA REPL for Web Assembly
homepagehttps://github.com/anoopelias/wasmrepl/
repositoryhttps://github.com/anoopelias/wasmrepl/
max_upload_size
id976519
size244,844
Anoop Elias (anoopelias)

documentation

README

wasmrepl

Since Web Assembly's text format is close to Lisp, maybe an attempt to a REPL prompt is in order!

Demo:

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 Wasm func, you can also define a new func 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.

Commit count: 369

cargo fmt