This uses calyx
as a library to provide an interactive
web demo for the Futil compiler. Futil is compiled to webassembly
and wrapped in simple javascript that interfaces with the compiler.
For now, this repository uses a git checkout of the Futil repository.
You need Rust and Node.js and NPM installed. To get WebAssembly support, the easiest way is to install Rust with rustup as opposed to a package manager.
Then install wasm-pack
with:
cargo install wasm-pack wasm-bindgen-cli
Now you are ready to build and run the web demo. First, install the npm
dependencies with:
npm i
Run a test web server with:
npm start
The server will automatically refresh if you change any of the JavaScript or Rust code. You can build standalone files with:
npm run build