You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on reddit post, I've tried setting up simple example with custom std.
I'm using nightly toolchain (2022-05-19), copied rust-src to local folder (cp -r $(rustc +nightly --print sysroot)/lib/rustlib/src/rust .), and setup new project next to it, With Xargo.toml:
[dependencies.std]
features = ["panic-unwind"]
and running XARGO_RUST_SRC=../rust/src xargo run --release results in
warning: dependency (std) specified without providing a local path,
Git repository, or version to use. This will be considered an error
in future versions
Updating crates.io index
error: no matching package named `std` found
location searched: registry `crates-io`
required by package `sysroot v0.0.0 (C:\Users\SHADOW~1\AppData\Local\Temp\xargo.P69tPZMMepsy)`
error: `"cargo" "build" "--release" "--manifest-path" "C:\\Users\\SHADOW~1\\AppData\\Local\\Temp\\xargo.P69tPZMMepsy\\Cargo.toml" "--target" "x86_64-pc-windows-msvc" "-p" "std"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
Adding path = "../rust/library/std" to Xargo.toml changes error message to
Compiling compiler_builtins v0.1.71
Compiling rustc-std-workspace-core v1.0.0
Compiling libc v0.2.125
Compiling core v0.0.0 (D:\Projects\custom-std\rust\library\core)
Compiling cc v1.0.69
Compiling rustc-std-workspace-alloc v1.0.0
Compiling std v0.0.0 (D:\Projects\custom-std\rust\library\std)
error[E0463]: can't find crate for `std`
For more information about this error, try `rustc --explain E0463`.
error: could not compile `rustc-std-workspace-core` due to previous
error
warning: build failed, waiting for other jobs to finish...
error: could not compile `rustc-std-workspace-alloc` due to previous error
error: `"cargo" "build" "--release" "--manifest-path" "C:\\Users\\SHADOW~1\\AppData\\Local\\Temp\\xargo.wsQ9hNCjPrzi\\Cargo.toml" "--target" "x86_64-pc-windows-msvc" "-p" "std"` failed with exit code: Some(101)
note: run with `RUST_BACKTRACE=1` for a backtrace
The text was updated successfully, but these errors were encountered:
That said, note that these days XARGO_RUST_SRC expects the path to the library subfolder of the Rust source tree. (That subfolder used to be called src when the xargo env var name was picked, but it has gotten renamed a few years ago.)
Based on reddit post, I've tried setting up simple example with custom
std
.I'm using nightly toolchain (
2022-05-19
), copiedrust-src
to local folder (cp -r $(rustc +nightly --print sysroot)/lib/rustlib/src/rust .
), and setup new project next to it, WithXargo.toml
:and running
XARGO_RUST_SRC=../rust/src xargo run --release
results inAdding
path = "../rust/library/std"
toXargo.toml
changes error message toThe text was updated successfully, but these errors were encountered: