Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ids1024/rust-minix
WIP Port of Rust's std to Minix
https://github.com/ids1024/rust-minix
Last synced: about 1 month ago
JSON representation
WIP Port of Rust's std to Minix
- Host: GitHub
- URL: https://github.com/ids1024/rust-minix
- Owner: ids1024
- License: apache-2.0
- Created: 2019-02-16T23:20:39.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-14T03:36:28.000Z (almost 5 years ago)
- Last Synced: 2024-10-14T09:35:45.795Z (2 months ago)
- Language: Makefile
- Homepage:
- Size: 45.9 KB
- Stars: 43
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
- not-yet-awesome-rust - `rust-minix` - compiling-rust-code-to-minix/). (Embedded development / Stack Overflow)
README
[![Build Status](https://travis-ci.org/ids1024/rust-minix.svg?branch=master)](https://travis-ci.org/ids1024/rust-minix)
WIP Port of Rust's std to Minix
===============================Some additional information on this port can by found in [my blog post introducing it](https://iandouglasscott.com/2019/02/18/cross-compiling-rust-code-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.
```bash
export MINIX_TOOLDIR=~/minix/obj.i386/tooldir.Linux-4.20.1-arch1-1-ARCH-x86_64
export MINIX_ROOT=~/minix/obj.i386/destdir.i386make update-submodules
makecargo new --bin hello
cd hello
../cargo-minix build --target i586-unknown-minix --release
cd ..git clone https://github.com/ids1024/ripgrep -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).