1 # riscv32imac-unknown-xous-elf
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.
9 - [@xobs](https://github.com/xobs)
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.
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).
18 ## Building the target
20 The target can be built by enabling it for a `rustc` build.
24 target = ["riscv32imac-unknown-xous-elf"]
27 Make sure your C compiler is included in `$PATH`, then add it to the `config.toml`:
30 [target.riscv32imac-unknown-xous-elf]
31 cc = "riscv-none-elf-gcc"
32 ar = "riscv-none-elf-ar"
35 ## Building Rust programs
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:
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)
46 This target can be cross-compiled from any host.
50 Currently there is no support to run the rustc test suite for this target.