IssueRaiser

[Request for Experiment] Sysroot building functionality

# Summary This RFE proposes adding [Xargo]'s functionality of building a sysroot on the fly to Cargo as a nightly-only feature. [Xargo]: https://github.com/japaric/xargo # Motivation Many (all?) no-std / embedded developers have to Install One More Tool because the ability to build core / std from source is missing in Cargo. Apart from the inconvenience, the Xargo wrapper is from for perfect: it can trigger unnecessary sysroot rebuilds because it doesn't replicate Cargo fingerprinting mechanism; it can sometimes fail to trigger a necessary sysroot rebuild (japaric/xargo#189); it doesn't track changes in the sysroot source code (japaric/xargo#139); and it doesn't understand the `+nightly` command line argument because it's not a rustup shim (japaric/xargo#123) among other deviations from the behavior users expect from a built-in Cargo subcommand. Apart from all the issues Xargo also ties no-std / embedded development to the nightly channel. This experiment will hopefully be a first step towards enabling no-std / embedded development on the stable channel. # Implementation details ## User interface: `[sysroot]` A `[sysroot]` section will be added to Cargo configuration file: ``` toml # .cargo/config [sysroot] rust-src = "~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src" [sysroot.core] path = "libcore" # paths are relative to `rust-src` when not absolute stage = 1 # see multi-stage builds section below [sysroot.compiler_builtins] git = "h

Posted by japaric on Jan 20, 2018, 12:52 AM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

reliability (Sysadmin)

[Request for Experiment] Sysroot building functionality

japaricJan 20, 2018, 12:52 AM

# Summary This RFE proposes adding [Xargo]'s functionality of building a sysroot on the fly to Cargo as a nightly-only feature. [Xargo]: https://github.com/japaric/xargo # Motivation Many (all?) no-std / embedded developers have to Install One More Tool because the ability to build core / std from source is missing in Cargo. Apart from the inconvenience, the Xargo wrapper is from for perfect: it can trigger unnecessary sysroot rebuilds because it doesn't replicate Cargo fingerprinting mechanism; it can sometimes fail to trigger a necessary sysroot rebuild (japaric/xargo#189); it doesn't track changes in the sysroot source code (japaric/xargo#139); and it doesn't understand the `+nightly` command line argument because it's not a rustup shim (japaric/xargo#123) among other deviations from the behavior users expect from a built-in Cargo subcommand. Apart from all the issues Xargo also ties no-std / embedded development to the nightly channel. This experiment will hopefully be a first step towards enabling no-std / embedded development on the stable channel. # Implementation details ## User interface: `[sysroot]` A `[sysroot]` section will be added to Cargo configuration file: ``` toml # .cargo/config [sysroot] rust-src = "~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src" [sysroot.core] path = "libcore" # paths are relative to `rust-src` when not absolute stage = 1 # see multi-stage builds section below [sysroot.compiler_builtins] git = "h

Comments (0)

No comments yet. Start the discussion.

Comment on this issue