#flags #source #sysroot #rustc #build #version #how

rustc-build-sysroot

Build a rustc sysroot with custom flags

14 releases

0.4.6 Apr 14, 2024
0.4.5 Feb 23, 2024
0.4.4 Jan 7, 2024
0.4.2 May 5, 2023
0.4.0 Nov 6, 2022

#71 in Programming languages

Download history 4811/week @ 2023-12-24 4180/week @ 2023-12-31 6218/week @ 2024-01-07 5771/week @ 2024-01-14 5256/week @ 2024-01-21 4172/week @ 2024-01-28 6200/week @ 2024-02-04 6345/week @ 2024-02-11 6082/week @ 2024-02-18 5531/week @ 2024-02-25 6150/week @ 2024-03-03 6587/week @ 2024-03-10 6883/week @ 2024-03-17 5865/week @ 2024-03-24 6471/week @ 2024-03-31 4458/week @ 2024-04-07

24,454 downloads per month
Used in 3 crates

MIT/Apache

22KB
368 lines

rustc-build-sysroot

This crate offers the ability to build a rustc sysroot from source. You can think of it as a very lightweight version of xargo (which was a useful source for information on how to do this), or a version of cargo -Zbuild-std that builds a sysroot rather than building the standard library for the current crate.

Building the sysroot from source is useful for tools like Miri and cargo-careful that need the standard library to be built with different flags. Building a sysroot from different sources is not a goal of this crate.

The crate builds on stable Rust, but actually building a sysroot requires a recent nightly version. Nightly versions from the last 3 months are supported.


lib.rs:

Offers an easy way to build a rustc sysroot from source.

Dependencies

~2–12MB
~120K SLoC