Closed raphaelcohn closed 3 years ago
In my workspace folder, I have a .cargo folder with a config file containing the following:-
workspace
.cargo
config
[source.crates-io] replace-with = "vendored-sources" [source.vendored-sources] directory = "vendor"
My workspace folder contains a Cargo.toml with a list of workspace members, eg
Cargo.toml
[workspace] members = [ "context-allocator", "linux-support" ]
This works fine; I occasionally vendor my sources when one of those members has a new dependency.
Issuing cargo build --release -Zbuild-std=panic_abort,std -Zbuild-std-features=panic_immediate_abort --target=x86_64-unknown-linux-musl from inside the workspace folder fails:
cargo build --release -Zbuild-std=panic_abort,std -Zbuild-std-features=panic_immediate_abort --target=x86_64-unknown-linux-musl
error: no matching package named `compiler_builtins` found location searched: registry `https://github.com/rust-lang/crates.io-index` required by package `std v0.0.0 (/Users/raph/.rustup/toolchains/nightly-2020-10-14-x86_64-apple-darwin/lib/rustlib/src/rust/library/std)` Raphaels-Pro:workspace raph$ cargo build --release -Zbuild-std=panic_abort,std -Zbuild-std-features=panic_immediate_abort --target=x86_64-unknown-linux-musl
Moving the .cargo folder / getting rid of the config file means it works.
Now, this makes some sense - compiler_builtins hasn't been vendored. But how can I vendor it, if it is not a dependency?!
compiler_builtins
Perhaps with a fake crate and module, but that's not really a great solution.
Thanks for the report! Vendoring is currently not support. Closing as a duplicate of #23.
In my
workspace
folder, I have a.cargo
folder with aconfig
file containing the following:-My workspace folder contains a
Cargo.toml
with a list of workspace members, egThis works fine; I occasionally vendor my sources when one of those members has a new dependency.
Issuing
cargo build --release -Zbuild-std=panic_abort,std -Zbuild-std-features=panic_immediate_abort --target=x86_64-unknown-linux-musl
from inside theworkspace
folder fails:Moving the
.cargo
folder / getting rid of theconfig
file means it works.Now, this makes some sense -
compiler_builtins
hasn't been vendored. But how can I vendor it, if it is not a dependency?!Perhaps with a fake crate and module, but that's not really a great solution.