bjorn3
b86eb2e8ba
Some optimizations
* Only format global _comments when debug_assertions are enabled * Only call build_value_labels_ranges in base.rs when debug_assertions are enabled Benchmark #1: CHANNEL='pre' ../cargo.sh build Time (mean ± σ): 17.657 s ± 1.050 s [User: 31.871 s, System: 3.014 s] Range (min … max): 16.907 s … 20.394 s 10 runs Benchmark #2: ../cargo.sh build Time (mean ± σ): 16.640 s ± 0.255 s [User: 30.238 s, System: 2.965 s] Range (min … max): 16.413 s … 17.186 s 10 runs Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet PC without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options. Summary '../cargo.sh build' ran 1.06 ± 0.07 times faster than 'CHANNEL='pre' ../cargo.sh build'
WIP Cranelift codegen backend for rust
⚠⚠⚠ Threads and certain kinds of FFI don't work yet. ⚠⚠⚠
Building
$ git clone https://github.com/bjorn3/rustc_codegen_cranelift.git
$ cd rustc_codegen_cranelift
$ ./prepare.sh # download and patch sysroot src and install hyperfine for benchmarking
$ ./test.sh
Usage
$cg_clif_dir
is the directory you cloned this repo into in the following instruction.
Cargo
$ $cg_clif_dir/cargo.sh run
Rustc
$ rustc -Cpanic=abort -Zcodegen-backend=$cg_clif_dir/target/debug/librustc_codegen_cranelift.so --sysroot $cg_clif_dir/build_sysroot/sysroot my_crate.rs
Not yet supported
- Good non-rust abi support (several problems)
- Checked binops (some missing instructions in cranelift)
- Inline assembly (no cranelift support, not coming soon)
- SIMD (tracked here, some basic things work)
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.
Description
Languages
Rust
96.2%
RenderScript
0.7%
JavaScript
0.6%
Shell
0.6%
Fluent
0.4%
Other
1.3%