rust-osdev / cargo-xbuild

Automatically cross-compiles the sysroot crates core, compiler_builtins, and alloc.
Apache License 2.0
258 stars 25 forks source link

How to use a custom std #83

Open vinaychandra opened 4 years ago

vinaychandra commented 4 years ago

xbuild currently compiles core and alloc and puts in the custom sysroot. Is it possible to put a custom std in that location and compile it?

The idea is that we can provide a minimal custom std so that crates that need std can be compiled without changing their code.

phil-opp commented 4 years ago

This is not supported currently and I don't think that we will add a feature like this, given that this crate is likely replaced by the -Zbuild-std feature of cargo soon (also see https://github.com/rust-lang/wg-cargo-std-aware/issues/7 for a discussion about custom standard libraries with -Zbuild-std).

As far as I know, the xargo project does support building a custom standard library, so maybe that works for you.