diff --git a/crates/lox-wasm/README.md b/crates/lox-wasm/README.md index c9db215..3f0ffb7 100644 --- a/crates/lox-wasm/README.md +++ b/crates/lox-wasm/README.md @@ -1,3 +1,26 @@ # lox-wasm wasm bindings for the lox crate: https://git-crysp.uwaterloo.ca/iang/lox + +# Dependencies + +``` +cargo install wasm-pack +``` + +# Build + +``` +wasm-pack build --target web +``` + +# Testing + +The provided `index.html` file can be used for testing the lox bindings. First, follow the instructions to [run a lox server](https://gitlab.torproject.org/cohosh/lox-server). + +Then, spin up a simple local webserver in the current directory: +``` +python3 -m http.server 8000 +``` + +Next, open the dev console in your browser and navigate to `http://localhost:8000`. diff --git a/crates/lox-wasm/index.html b/crates/lox-wasm/index.html new file mode 100644 index 0000000..abbc18d --- /dev/null +++ b/crates/lox-wasm/index.html @@ -0,0 +1,49 @@ + + + + + Lox binding test + + + + + +