Build stable Rust binaries for Xous! This release targets Rust 1.80.0.
- Ensure you are running Rust 1.80.0. Future versions of Rust will need a different version of this software.
- Download the latest release from the releases page
- Unzip the zipfile to your Rust sysroot. On Unix systems can do this with something like:
cd $(rustc --print sysroot)
wget https://github.com/betrusted-io/rust/releases/latest/download/riscv32imac-unknown-xous_1.80.0.zip
rm -rf lib/rustlib/riscv32imac-unknown-xous-elf # Remove any existing version
unzip *.zip
rm *.zip
cd -
On Windows with Powershell you can run:
Push-Location $(rustc --print sysroot)
if (Test-Path lib\rustlib\riscv32imac-unknown-xous-elf) { Remove-Item -Recurse -Force lib\rustlib\riscv32imac-unknown-xous-elf }
Invoke-WebRequest -Uri https://github.com/betrusted-io/rust/releases/latest/download/riscv32imac-unknown-xous_1.80.0.zip -Outfile toolchain.zip
Expand-Archive -DestinationPath . -Path toolchain.zip
Remove-Item toolchain.zip
Pop-Location
- Install a RISC-V toolchain, and ensure it's in your path. Set
CC
andAR
to point to the toolchain's -gcc and -ar binaries. - Run
./rebuild.sh
. This will build libstd and install it.
On Windows, you can use the rebuild.ps1
script to build and install this package. You will need
to have a Riscv compiler in your path.
Run rebuild.ps1
. It is recommended that you run it under a new shell in order to avoid polluting your environment with Rust-specific variables:
powershell .\rebuild.ps1