]> git.lizzy.rs Git - rust.git/blob - Readme.md
Better libcore building instructions and rustup
[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 $ rustup override set nightly
11 $ git submodule update --init
12 $ cargo build
13 ```
14
15 ## Usage
16
17 ```bash
18 $ rustc -Zcodegen-backend=$(pwd)/target/debug/librustc_codegen_cranelift.so my_crate.rs --crate-type lib -Og
19 ```
20
21 > You must compile with `-Og`, because checked binops are not yet supported.
22
23 ## Building libcore
24
25 ```bash
26 $ rustup component add rust-src
27 $ ./prepare_libcore.sh
28 $ ./build.sh
29 ```
30
31 > ⚠⚠⚠ You will get a panic because of unimplemented stuff ⚠⚠⚠
32
33 ## Not yet supported
34
35 * [ ] Checked binops
36 * [ ] Statics
37 * [ ] Drop glue
38
39 * [ ] Building libraries
40 * [ ] Other call abi's
41 * [ ] Unsized types
42 * [ ] Slice indexing
43 * [ ] Sub slice
44 * [ ] Closures
45 * [ ] Some rvalue's
46
47 * [ ] Inline assembly
48 * [ ] Custom sections
49
50 ## Known errors
51
52 * [ ] cranelift-module api seems to be used wrong, thus causing panic for some consts
53 * [ ] cranelift-codegen doesn't have encodings for some instructions for types smaller than I32