Empowering everyone to build reliable and efficient software.
Go to file
2018-11-11 11:40:41 +01:00
example Add some benchmarks 2018-11-05 18:42:43 +01:00
src Remove commented out code 2018-11-11 11:40:41 +01:00
xargo Some changes 2018-10-10 18:36:47 +02:00
.gitignore Some more changes 2018-10-10 19:04:20 +02:00
.travis.yml [Travis] test on macOS too 2018-11-07 14:07:12 +01:00
0001-Disable-stdsimd.patch Disable stdsimd in libstd too 2018-10-06 11:12:06 +02:00
0002-Disable-u128-and-i128-in-libcore.patch Rustup to rustc 1.32.0-nightly (36a50c29f 2018-11-09) 2018-11-10 10:52:23 +01:00
0003-Disable-inline-assembly-in-spin_loop_hint.patch Implement a lot of atomic intrinsics 2018-10-06 10:24:09 +02:00
0004-Disable-some-more-unsupported-stuff-in-libcore.patch Rustup to rustc 1.31.0-nightly (de3d640f5 2018-10-01), fix a atomic bug and implement intrinsic bitreverse 2018-10-02 18:12:03 +02:00
0005-Disable-compiler_builtins.patch Add some more patches 2018-10-06 14:57:06 +02:00
0006-alloc-Disable-some-unsupported-stuff.patch Add some more patches 2018-10-06 14:57:06 +02:00
0007-Fix-libstd-building.patch Add some more patches 2018-10-06 14:57:06 +02:00
build.sh Disable alloc_example and compile mod_bench_inline's sysroot with -Zmir-opt-level=3 2018-11-11 11:40:41 +01:00
Cargo.lock Call linker from cg_clif 2018-11-11 11:40:31 +01:00
Cargo.toml Call linker from cg_clif 2018-11-11 11:40:31 +01:00
copy.clif Fix some bugs 2018-08-08 10:26:25 +02:00
LICENSE-APACHE Create LICENSE-APACHE 2018-06-22 19:33:35 +02:00
LICENSE-MIT Add LICENSE-MIT 2018-06-22 19:34:27 +02:00
prepare_libcore.sh Add some more patches 2018-10-06 14:57:06 +02:00
Readme.md Update Readme.md 2018-10-10 19:12:41 +02:00
rust-toolchain Initial commit 2018-06-17 18:05:11 +02:00

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
$ rustup override set nightly
$ cargo install xargo
$ git submodule update --init
$ cargo build

Usage

$ rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so my_crate.rs --crate-type lib -Og

Building libcore

$ rustup component add rust-src
$ ./prepare_libcore.sh
$ ./build.sh

Not yet supported

  • Checked binops

  • Drop glue

  • Other call abi's

  • Sub slice

  • Inline assembly

  • Custom sections