]> git.lizzy.rs Git - rust.git/blob - src/doc/rustc/src/platform-support/riscv32imac-unknown-xous-elf.md
Rollup merge of #106692 - eggyal:mv-binary_heap.rs-binary_heap/mod.rs, r=Mark-Simulacrum
[rust.git] / src / doc / rustc / src / platform-support / riscv32imac-unknown-xous-elf.md
1 # riscv32imac-unknown-xous-elf
2
3 **Tier: 3**
4
5 Xous microkernel, message-based operating system that powers devices such as Precursor and Betrusted. The operating system is written entirely in Rust, so no additional software is required to compile programs for Xous.
6
7 ## Target maintainers
8
9 - [@xobs](https://github.com/xobs)
10
11 ## Requirements
12
13
14 Building the target itself requires a RISC-V compiler that is supported by `cc-rs`. For example, you can use the prebuilt [xPack](https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/latest) toolchain.
15
16 Cross-compiling programs does not require any additional software beyond the toolchain. Prebuilt versions of the toolchain are available [from Betrusted](https://github.com/betrusted-io/rust/releases).
17
18 ## Building the target
19
20 The target can be built by enabling it for a `rustc` build.
21
22 ```toml
23 [build]
24 target = ["riscv32imac-unknown-xous-elf"]
25 ```
26
27 Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`:
28
29 ```toml
30 [target.riscv32imac-unknown-xous-elf]
31 cc = "riscv-none-elf-gcc"
32 ar = "riscv-none-elf-ar"
33 ```
34
35 ## Building Rust programs
36
37 Rust does not yet ship pre-compiled artifacts for this target. To compile for
38 this target, you will need to do one of the following:
39
40 * Build Rust with the target enabled (see "Building the target" above)
41 * Build your own copy of `core` by using `build-std` or similar
42 * Download a prebuilt toolchain [from Betrusted](https://github.com/betrusted-io/rust/releases)
43
44 ## Cross-compilation
45
46 This target can be cross-compiled from any host.
47
48 ## Testing
49
50 Currently there is no support to run the rustc test suite for this target.