Skip to content

Conversation

@neuschaefer
Copy link
Contributor

xargo is no longer actively developed and has fortunately become unnecessary due to the build-std option in cargo.

Fixes: #692


The plan is to try all targets and see which ones actually need build-std. I will then add build-std in targets.toml as needed. It is also possible that I'm missing something else.

xargo is no longer actively developed and has fortunately become
unnecessary due to the build-std option in cargo.

Fixes: cross-rs#692
@a5ehren
Copy link

a5ehren commented Nov 5, 2025

Not sure when it quit working, but note that at least as of Rust 1.91 you can no longer build an image from the Dockerfiles due to Xargo:


25.83    Compiling dirs-sys v0.3.7
25.83    Compiling fs2 v0.4.3
25.91    Compiling dirs v4.0.0
26.23    Compiling tempdir v0.3.7
27.15    Compiling toml v0.5.11
28.00 error[E0308]: mismatched types
28.00    --> /tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/xargo-0.3.26/src/flock.rs:118:41
28.00     |
28.00 118 |                 acquire(msg, &path, &|| f.try_lock_shared(), &|| f.lock_shared())?;
28.00     |                                         ^^^^^^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `Result<(), TryLockError>`
28.00     |
28.00     = note: expected enum `std::result::Result<_, std::io::Error>`
28.00                found enum `std::result::Result<_, std::fs::TryLockError>`
28.00 help: use `?` to coerce and return an appropriate `Err`, and wrap the resulting value in `Ok` so the expression remains of type `Result`
28.00     |
28.00 118 |                 acquire(msg, &path, &|| Ok(f.try_lock_shared()?), &|| f.lock_shared())?;
28.00     |                                         +++                   ++
28.00
28.12 For more information about this error, try `rustc --explain E0308`.
28.12 error: could not compile `xargo` (lib) due to 1 previous error
28.12 warning: build failed, waiting for other jobs to finish...
28.80 error: failed to compile `xargo v0.3.26`, intermediate artifacts can be found at `/tmp/cargo-installH3IbjE`.
28.80 To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
------
Dockerfile.x86_64-pc-windows-gnu:11
--------------------
   9 |
  10 |     COPY xargo.sh /
  11 | >>> RUN /xargo.sh
  12 |
  13 |     FROM cross-base AS build
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c /xargo.sh" did not complete successfully: exit code: 101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

drop xargo in favor of build-std

2 participants