Group members:
- James Bingen
- Dinu Blanovschi
- Yigit Çolakoğlu
Responsible TA: Arthur Jacques
To run, just do cargo run
Set the environment variable LLVM_SYS_211_PREFIX to the path to a local LLVM 21.1.* installation.
$LLVM_SYS_211_PREFIX/bin/llvm-config should be available to configure the compilation of this project.
Then run with the --features llvm-backend flag:
cargo run --features llvm-backendRefer to the testing section in the report.
TL;DR:
cargo testOr
cargo test --features llvm-backendTo run the LLVM backend tests as well.
The wasm bindings are behind the wasm feature and expose:
parse(source: &str) -> Stringcompile(source: &str, opts: Vec<String>, dve_emit_warnings: bool) -> JsValue
opts accepts the same pass names as the CLI --opt flag: full, none, cp, dve,
cpdvetdb, bi, hp, ps, vi, vips, phi2sel, bd, tu, tdb.
compile returns a structured object:
{ ok, cfg_text, graphviz, errors: [{ range, error_name, severity }], warnings: [{ range, error_name, severity }] }.
Build with:
cargo build --target wasm32-unknown-unknown --features wasm --libIf you see missing target errors, install it first:
rustup target add wasm32-unknown-unknowncd playground
bun i
bun run dev