Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Latest commit 07e6d84 Feb 18, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Add clang wrapper I forget to commit; download pth Feb 17, 2019
libc @ 574d967 Update libc Feb 18, 2019
rust @ 66be935 Update libc and rust to use pth Feb 17, 2019
.gitmodules Build std directly without xargo Feb 18, 2019
LICENSE-MIT Add LICENSE files Feb 18, 2019
Makefile Update clean rule Feb 18, 2019
cargo-minix Generic cargo wrapper Feb 18, 2019
i586-unknown-minix.json Use .cargo/config Feb 18, 2019

WIP Port of Rust's std to Minix

For the moment, this is set up to allow cross compiling from Linux. Other systems with Rust compiler may work, but are not tested.

make is used to build a copy of std targeting Minix. Then the cargo-minix script can be used instead of cargo to set all the necessary environmental variables so that the i586-unknown-minix target and std is available.

cargo-minix should either be run in a subdirectory of this repo, or the .cargo directory created by make must be copied.

export MINIX_TOOLDIR=~/minix/obj.i386/tooldir.Linux-4.20.1-arch1-1-ARCH-x86_64
export MINIX_ROOT=~/minix/obj.i386/destdir.i386

make update-submodules

cargo new --bin hello
cd hello
../cargo-minix build --target i586-unknown-minix --release
cd ..

cd libc/libc-test
../../cargo-minix test --target i586-unknown-minix --no-run
cd ../..

git clone -b minix
cd ripgrep
../cargo-minix build --target i586-unknown-minix --release
cd ..

NOTE: Using a nightly compiler to build std from a fork of the rust repository, as done here, is not supported and not guaranteed to work, since std depends on unstable features that may change in later compiler versions. But the correct solution requires compiling rustc from the same source tree (while takes a long time and a lot of disk space). So this should be fine, but may break at any time (which is fixed by using an older nightly, or merging upstream into the rust fork).

You can’t perform that action at this time.