Using cargo 1.56.0-nightly (e515c3277 2021-09-08)
I have a Rust package that I build with cargo build -Zbuild-std=core,alloc. With these -Zbuild-std parameters cargo needs to build compiler_builtins for this package, but if I run cargo +nightly vendor -Zbuild-std=core,alloc vendor directory does not contain compiler_builtins.
Repro:
cargo +nightly new --bin cargo_vendor_bug
- If you run
cargo +nightly build -Zbuild-std=core,alloc --target=wasm32-wasi you will see that it builds compiler_builtins.
cargo +nightly vendor -Zbuild-std=core,alloc
- Check
vendor directory; it won't have compiler_builtins
Deps being built by this -Zbuild-std command:
- core-0.0.0
- compiler_builtins-0.1.49
- rustc-std-workspace-core-1.99.0
- alloc-0.0.0
I'm guessing core and alloc here are built into the compiler and cannot be vendored, but I'd expect compiler_builtins and rustc-std-workspace-core to be vendored as at least compiler_builtins (maybe rustc-std-workspace-core too) is fetched from crates.io and I can't build my package without fetching deps from crates.io with cargo vendor because of this issue.
Using
cargo 1.56.0-nightly (e515c3277 2021-09-08)I have a Rust package that I build with
cargo build -Zbuild-std=core,alloc. With these-Zbuild-stdparameters cargo needs to build compiler_builtins for this package, but if I runcargo +nightly vendor -Zbuild-std=core,allocvendor directory does not contain compiler_builtins.Repro:
cargo +nightly new --bin cargo_vendor_bugcargo +nightly build -Zbuild-std=core,alloc --target=wasm32-wasiyou will see that it builds compiler_builtins.cargo +nightly vendor -Zbuild-std=core,allocvendordirectory; it won't have compiler_builtinsDeps being built by this
-Zbuild-stdcommand:I'm guessing core and alloc here are built into the compiler and cannot be vendored, but I'd expect compiler_builtins and rustc-std-workspace-core to be vendored as at least compiler_builtins (maybe rustc-std-workspace-core too) is fetched from crates.io and I can't build my package without fetching deps from crates.io with
cargo vendorbecause of this issue.