]> git.lizzy.rs Git - rust.git/blob - Readme.md
Implement int casts
[rust.git] / Readme.md
1 # Work in progress cranelift codegen backend for rust
2
3 > ⚠⚠⚠ This doesn't do anything useful yet ⚠⚠⚠
4
5 ## Building
6
7 ```bash
8 $ git clone https://github.com/bjorn3/rustc_codegen_cranelift.git
9 $ cd rustc_codegen_cranelift
10 $ git submodule update --init
11 $ cargo build
12 ```
13
14 ## Usage
15
16 ```bash
17 $ rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so my_crate.rs --crate-type lib -Og
18 ```
19
20 > You must compile with `-Og`, because checked binops are not yet supported.
21
22 ## Building libcore
23
24 ```bash
25 $ git clone https://github.com/rust-lang/rust.git
26 $ cd rust
27 $ git apply ../0001-Disable-stdsimd-in-libcore.patch
28 $ git apply ../0002-Disable-u128-and-i128-in-libcore.patch
29 $ cd ../
30 $ ./build.sh
31 ```
32
33 > ⚠⚠⚠ You will get a panic because of unimplemented stuff ⚠⚠⚠
34
35 ## Not yet supported
36
37 * [ ] Checked binops
38 * [ ] Statics
39 * [ ] Drop glue
40
41 * [ ] Building libraries
42 * [ ] Other call abi's
43 * [ ] Unsized types
44 * [ ] Slice indexing
45 * [ ] Sub slice
46 * [ ] Closures
47 * [ ] Some rvalue's
48
49 * [ ] Inline assembly
50 * [ ] Custom sections