- Rust
- wasm32-unknown-unknown target
- cargo-make
- node
cargo build --release
or
cargo make build-release
- Compile tiger source code.
./target/release/tiger /path/to/tiger-src > tiger.s
You can specify target by adding --arch <target>
argument.
ex. ./target/release/tiger --arch x86_64-apple-darwin main.tig
- Link it with runtime.
clang -no-pie tiger.s ./target/release/libcdylib.so
clang -no-pie tiger.s ./target/release/libcdylib.dylib
See (compiler-lib/Makefile.toml, index.html, test.js) or (web/Makefile.toml, runWasm.ts).
- aarch64-apple-darwin
- x86_64-apple-darwin
- x86_64-unknown-linux-gnu
- wasm32-unknown-unknown
cargo make test