- If the input file ends in .wat, it loads and runs it directly.
- Otherwise it treats it as JS and compiles to WAT.
- -o is optional; if provided, it writes the WAT output there. Usage examples:
- Compile JS and run:
cargo run --bin jswasm examples/test.js
- Compile JS, emit WAT, run:
cargo run --bin jswasm examples/test.js -o out.wat
- Run WAT directly:
cargo run --bin jswasm out.wat
- https://radu-matei.com/blog/practical-guide-to-wasm-memory/
- https://blog.scottlogic.com/2019/05/17/webassembly-compiler.html
- https://blog.scottlogic.com/2018/04/26/webassembly-by-hand.html
- https://blog.ttulka.com/learning-webassembly-4-wasm-memory-and-working-with-strings/
- https://charlycst.github.io/posts/wasm-memory-allocator/
- https://burgers.io/complete-novice-wasm-allocator
- https://healeycodes.com/a-custom-webassembly-compiler
- https://skanehira.github.io/writing-a-wasm-runtime-in-rust/14_build_runtime_wasi.html
- https://cohost.org/eniko/post/171803-basic-memory-allocat
- https://rust-hosted-langs.github.io/book/introduction.html
- https://openhome.cc/eGossip/WebAssembly/String.html
- https://www.maybeuninit.com/2022/05/31/concat-wasm.html
- https://yangdanny97.github.io/blog/2022/10/11/chocopy-wasm-backend
- https://coderundebug.com/learn/wat/tables/#callbacks
- https://www.mirkosertic.de/blog/2018/01/object-oriented-webassembly/