pombredanne / rustc_codegen_cranelift

WIP cranelift backend for rustc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Work in progress cranelift codegen backend for rust

⚠⚠⚠ This doesn't do much useful yet ⚠⚠⚠

Building

$ git clone https://github.com/bjorn3/rustc_codegen_cranelift.git
$ cd rustc_codegen_cranelift
$ ./prepare.sh # downloads and patches sysroot src and installs hyperfine for benchmarking
$ ./test.sh

Usage

$cg_clif_dir is the directory you cloned this repo into in the following instruction.

Rustc

$ rustc -Cpanic=abort -Zcodegen-backend=$cg_clif_dir/target/debug/librustc_codegen_cranelift.so my_crate.rs

Cargo

$ RUSTFLAGS="-Cpanic=abort -Zcodegen-backend=$cg_clif_dir/target/debug/librustc_codegen_cranelift.dylib --sysroot $cg_clif_dir/build_sysroot/sysroot" cargo run

Not yet supported

Troubleshooting

Can't compile

Try updating your nightly compiler. You can try to use an nightly a day or two older if updating rustc doesn't fix it. If you still can't compile it, please fill an issue.

About

WIP cranelift backend for rustc

License:Apache License 2.0


Languages

Language:Rust 97.9%Language:Shell 1.8%Language:C++ 0.2%