All notable changes to this project will be documented in this file. This project adheres to Semantic Versioning.
- Fix: The alloc crate uses the Rust 2021 edition now (#105)
- Ensure copied Cargo.lock is writable (#98)
- Don't panic on metadata errors (#100)
- Upgrade the crate to edition 2018 (#97)
- Fix winapi issues from flock() rework (#94)
- Remove fs2 dependency for broader platform support (#91)
- Cleanup: Use eprintln! instead of writeln! with stderr (#86)
- Breaking: Update cargo-xbuild to new rust directory layout (#87)
- Replace deprecated
tempdirdependency withtempfile(#84)
- Propagate
cargo-featuresfrom project's Cargo.toml (#82)
- Don't print warning about missing root package in quiet mode (#79)
- Pass -Cembed-bitcode=yes instead of -Clinker-plugin-lto for sysroot build (#73)
- Respect Cargo.lock file for sysroot build (#75)
- Set
-Clinker-plugin-ltofor the sysroot build (#71)
- Enable lto for sysroot build to fix missing bitcode error (#70)
- Add an environment variable to keep the temp dir (#67)
- Update dependencies (#65)
- Add
cargo xfixcommand (#64)
- Improvements to args and config for lib usage (#62)
- Fix: Not all projects have a root package (#61)
v0.5.24 - 2020-02-12
- Make
fn buildandArgspublic to enable use as lib (#59)
v0.5.23 - 2020-02-12
- Pick up xbuild config from workspace manifest (#57)
v0.5.22 - 2020-02-11
- Add new
panic_immediate_abortoption to the configuration table(#56)
v0.5.21 - 2020-01-21
- Override target path for building sysroot (#52)
v0.5.20 - 2019-12-20
- Fix wrong feature name for memcpy=false (#50)
v0.5.19 - 2019-12-13
- Add
--quietflag that suppresses "waiting for file lock" message (#43)
v0.5.18 - 2019-10-08
- Add support for publishing and installing cross compiled crates (#47)
v0.5.17 - 2019-09-15
- Fix warning about implicit trait objects (#46)
v0.5.16 - 2019-09-10
- Print a warning when building for the host system because this is often unintended.
- Building for the host system will also cause errors in build scripts of dependencies, which try to use the standard library. The reason is that cargo applies the
RUSTFLAGSenvironment variable also to build scripts in native compilation mode, thereby overriding the sysroot.
- Building for the host system will also cause errors in build scripts of dependencies, which try to use the standard library. The reason is that cargo applies the
v0.5.15 - 2019-07-17
- Add xb, xt, xc, and xr subcommands (#42)
v0.5.14 - 2019-07-11
- Don't append a
--sysrootargument toRUSTFLAGSif it already contains one (#40)
v0.5.13 - 2019-07-09
- Add
cargo xdoccommand for invokingcargo doc(#39).
v0.5.12 - 2019-06-13
- Fix incorrect joining of paths that caused some problems on Windows (
a1ff0331).
v0.5.11 - 2019-05-31
- Fix an issue with new
XBUILD_SYSROOT_PATHenvironment variable (#34)
v0.5.10 - 2019-05-31
- Error when sysroot contains spaces (#32)
- Allow overriding the sysroot path through a
XBUILD_SYSROOT_PATHenvironment variable (#33)
v0.5.9 - 2019-05-24
- Make backtraces optional through a new opt-in
backtracefeature. This removes the dependency onccby default, which has special compile-time requirements.
v0.5.8 - 2019-04-11
- Add
cargo xcheck/cargo xtestcommands for invokingcargo check/cargo test.
v0.5.7 - 2019-03-27
- Respect
CARGOenvironment variable - Canonicalize default specified in .cargo/config files if they end with
.json - Update dependencies in
Cargo.lockfile
v0.5.6 - 2019-03-23
- Add
cargo xruncommand for invokingcargo run
v0.5.5 - 2019-02-04
- Fix build on latest nightly:
liballocwas updated to Rust 2018
v0.5.4 - 2019-01-17
- Don't fail when the
liborbindirectories don't exist; only emit a warning
v0.5.3 - 2018-12-21
- Fix a bug introduced in 0.5.2: Backslash escaped quotes don't work on Windows, use single quotes instead
v0.5.2 - 2018-12-20
- Use the official approach for building the sysroot to avoid overwriting RUSTFLAGS (#25)
v0.5.1 - 2018-12-14
- Fix the sysroot build: the compiler_builtins crate now lives on crates.io
v0.5.0 - 2018-10-01
- Error instead of warn when
cargo xbuildis executed with a stable or beta compiler.
v0.4.9 - 2018-08-20
- Add
cargo xclippycommand for invokingcargo clippy
v0.4.8 - 2018-07-03
- Add
cargo xrustccommand for invokingcargo rustc
v0.4.7 - 2018-06-17
- Update configuration parsing to remove special treatment for
sysroot_path
v0.4.6 - 2018-06-17
- Unset RUSTFLAGS for sysroot building to support using the
--emit-linkflag.
v0.4.5 - 2018-06-17
- Add support for spaces in the sysroot path on Windows
v0.4.4 - 2018-06-01
- Add config option
sysroot_paththat defines where the sysroot should be placed. Defaults to thetarget/sysroot.
v0.4.3 - 2018-05-31
- Make behavior configurable through a
package.metadata.cargo-xbuildtable in theCargo.toml- Add a
memcpyflags that specifies whether thecompiler_builtinscrate should be built with thememfeature enabled. Defaults to true.
- Add a
v0.4.2 - 2018-05-07
- Implement
--help
v0.4.1 - 2018-05-06
- Fix docs link in Cargo.toml
v0.4.0 - 2018-05-05
- Forked as
cargo-xbuild - Cargo subcommand instead of standalone tool:
cargo xbuildinsetad ofxargo build - Remove support for all subcommands other than
build - Always build
core,compiler_builtinsandalloc- Building
stdis no longer possible
- Building
- Configuration via
Xargo.tomlis no longer possible - Build sysroot inside
targetfolder instead of global~/.xargo - Paths can be passed to
--targetnow:cargo xbuild src/../my-custom-target.json- The
RUST_TARGET_PATHis not needed for paths
- The
v0.3.12 - 2018-04-08
- The
coreandcompiler_builtinscrates are built when no Xargo.toml is present.
v0.3.11 - 2018-03-09
- Xargo now copies the
bindirectory from the original sysroot, the host sysroot, into its own. This lets you use binaries shipped with the Rust toolchain, like LLD.
v0.3.10 - 2017-12-28
- Print a warning when the stable or beta toolchain, which are not supported, is used.
- Set RUST_TARGET_PATH when building the sysroot. This fixes builds when using custom targets with a recent toolchain.
- The lock file included in the rust-src component is no longer used when building the sysroot. This fixes building a sysroot that contains the compiler-builtins crate.
v0.3.9 - 2017-09-06
-
Use Cargo.lock from the
rust-srccomponent if available. With this change the Xargo sysroot will be built using the exact same set of dependencies that the official sysroot distributed via rustup uses. -
The
RUSTFLAGSvariable internally used by Xargo is now printed when verbose (-v) mode is enabled.
- Updated the documentation about building
stdwith recent nightlies.
v0.3.8 - 2017-05-30
- Improved the error message when
--target foo.jsonis used.
v0.3.7 - 2017-05-13
- Improved the error message when the
rust-srccomponent is missing.
v0.3.6 - 2017-04-07
- Xargo on Windows. The layout of the default / rustc sysroot recently changed on Windows on broke the code that copied the host part of the rustc sysroot into the Xargo sysroot.
v0.3.5 - 2017-01-20
- Relative paths in
dependencies.{}.pathwere not being correctly handled.
v0.3.4 - 2017-01-18
- A
[dependencies.{}.stage](or[target.{}.dependencies.{}.stage]) entry in Xargo.toml. This lets you build a sysroot in "stages". This is required, for instance, to build thetestcrate whose dependency on thestdcrate is not explicitly listed in its Cargo.toml. Example:
To make xargo test work
# Xargo.toml
[dependencies.std]
features = ["panic_unwind"] # `test` depends on this `std` feature
# stage = 0 # implicit
[dependencies.test]
stage = 1- Support for
[dependencies.{}.git]or[dependencies.{}.path](and theirtarget.{}.dependenciesvariants) in Xargo.toml. With this feature you can inject foreign crates (crates which are not part of therust-srccomponent) into the sysroot. The main use case is replacing thestdcrate with a drop in replacement. Example:
Replace std with steed
[dependencies.collections] # `steed` depends on `collections`
[dependencies.std]
git = "https://github.com/japaric/steed"
stage = 1v0.3.3 - 2017-01-09
- Support for building a custom sysroot when compiling natively.
- Support for specifying dependencies as
[dependencies]in Xargo.toml.
v0.3.2 - 2017-01-03
XARGO_RUST_SRCis now used when working with nightly Rust and it has precedence over therust-srccomponent.
v0.3.1 - 2016-12-30
- You can now specify the location where Xargo stores the sysroots via the
XARGO_HOMEenvironment variable. If unspecified, the sysroots will be stored in$HOME/.xargo
v0.3.0 - 2016-12-28
-
[breaking-change] By default, Xargo now only compiles the
corecrate. To build more crates, use aXargo.tomlfile -
[breaking-change] Xargo will now build a sysroot for any target that's not the host.
-
The verbose flag,
-v, makes Xargo print all the shell commands it invokes to stderr.
v0.2.3 - 2016-12-19
- Support for the 'dev' channel. When using the dev channel, you must specify the path to the Rust source directory via the XARGO_RUST_SRC environment variable.
- The rust-src search logic to account for recent changes in the Rust distribution.
v0.2.2 - 2016-12-12
-
Xargo will now try to build every crate "below"
std, i.e. all its dependencies, in topological order. This makes Xargo robust against changes in thestdfacade as it no longer depends on hard coded crate names likerustc_unicode. -
Xargo won't rebuild the sysroot if the only thing that changed in Cargo.toml is profile.*.lto. Enabling/disabling LTO doesn't change how dependencies are compiled.
-
Xargo won't rebuild the sysroot if the linker flags (
-C link-arg) have changed. Those don't affect how the dependencies are compiled.
v0.2.1 - 2016-10-22
- No weird
()output inxargo -Vif Xargo was built viacargo install - Better formatted error messages. Mention the RUST_BACKTRACE env variable which is used to get backtraces on errors.
v0.2.0 - 2016-10-16
- Statically linked binary releases for Linux (x86 musl targets)
xargo -Voutput now includes the commit hash and date
- Xargo now depends on the
rust-srccomponent being installed. Install it withrustup component add rust-src. - Xargo no longer depends on libcurl, libssh or libssl and, therefore, it's now much easier to build.
- Xargo now respects the existing rustdocflags (RUSTDOCFLAGS env var, build.rustdocflags, etc) when passing --sysroot to rustdoc.
- File locking logic has been revised/simplied and now lock periods are shorter
v0.1.14 - 2016-10-09
xargo -Vandxargo --versionnow report Xargo's version as well as Cargo's.
v0.1.13 - 2016-10-06
- Xargo now builds a sysroot for the new built-in
thumbv*-none-eabi*targets which don't ship with a binary release of the standard crates.
v0.1.12 - 2016-10-04
- Xargo now supports per-target rustflags:
target.thumbv7em-none-eabihf.rustflagsin .cargo/config.
v0.1.11 - 2016-09-30
xargo cleanand other commands not associated to building stuff no longer trigger a sysroot rebuild.
v0.1.10 - 2016-09-28
xargo doc, which wasn't working because we didn't pass --sysroot to rustdoc. Note that rustdoc gained support for '--sysroot' as of nightly-2016-06-28, so that version or newer is required to usexargo doc.
v0.1.9 - 2016-09-27
- "error: Invalid cross-device link (os error 18)" which occurred when
$CARGO_HOMEwas mounted in a different device than "$XARGO_HOME" (~/.xargo). The solution was to stop using hard links to place the host libraries in the Xargo sysroot and instead just copy them. This is a regression in disk usage but this problem was coming up in common Docker usage patterns (-v A:B).
v0.1.8 - 2016-09-04
- All the status messages are now printed to stderr instead of to stdout. Cargo did the same change (from stdout to stderr) a while ago. Let's follow suit.
- When compiling crate
foowith Xargo, the profile section offoo's Cargo.toml is also "taken into account" when compiling the sysroot. For example, iffoohas setpanic = "abort"for all its profiles, then the sysroot will also be compiled with-C panic=abort. Previously, this wasn't the case.
v0.1.7 - 2016-09-03
- The sysroot now gets rebuilt when rust-src changes.
v0.1.6 - 2016-08-29
- Xargo can now use the source code installed by rustup. When available, this is the preferred way to fetch the source code and saves network bandwidth by not having to fetch the source tarball.
v0.1.5 - 2016-08-11
- Xargo now works properly when called from a
rustup overriden directory.
v0.1.4 - 2016-08-06
- Support targets that don't support atomics (
"max-atomic-width": 0). For these targets, Xargo only compiles thecoreandrustc_unicodecrates as the other crates depend on atomics (e.g.alloc::Arc).
v0.1.3 - 2016-04-24
xargo (..) --verbosepasses--verboseto thecargocall that builds the sysroot.- the sysroot now gets rebuilt when RUSTFLAGS or build.rustflags is modified.
- Xargo now respects the build.rustflags value set in .cargo/config.
- A bug where the hash/date file didn't get properly truncated before updating it leading to Xargo to always trigger a sysroot rebuild.
v0.1.2 - 2016-04-24 [YANKED]
- Xargo now uses file locking and can be executed concurrently.
- Xargo now print its current status to the console while building a sysroot.
- Xargo now reports errors to the console instead of panicking.
- Logging via
RUST_LOGhas been removed now that Xargo prints its status to the console.
- Initial release