Skip to content

shared: point users at cargo and cross-toolchains in no-image error#1775

Open
c-tonneslan wants to merge 1 commit into
cross-rs:mainfrom
c-tonneslan:improve-no-docker-image-error
Open

shared: point users at cargo and cross-toolchains in no-image error#1775
c-tonneslan wants to merge 1 commit into
cross-rs:mainfrom
c-tonneslan:improve-no-docker-image-error

Conversation

@c-tonneslan
Copy link
Copy Markdown

Closes #1447.

The current error when cross doesn't have a Docker image for a target (e.g. x86_64-apple-darwin or x86_64-pc-windows-msvc) just tells you to specify a custom image in Cross.toml:

[cross] warning: `cross` does not provide a Docker image for target x86_64-apple-darwin, specify a custom image in `Cross.toml`.

That's not very actionable. Two cases I keep running into:

  • target == host (or basically host, like macOS on macOS). Just cargo build works.
  • target needs the Apple/MSVC SDKs. cross-toolchains has community Dockerfiles for that.

Mention both in the message so people can find their next step without having to dig through the issue tracker or matrix room.

When `cross` runs against a target it doesn't ship an image for
(typical examples: x86_64-apple-darwin, x86_64-pc-windows-msvc) the
error just told the user to specify a custom image in Cross.toml,
which isn't very actionable if you don't already know what an image
for that target looks like.

Two cases that come up a lot:
- target == host (or basically host, like macOS-on-macOS). Plain
  cargo already works.
- target needs the proprietary Apple/MSVC SDKs. The community
  cross-toolchains repo has Dockerfiles for that.

Mention both in the error so people can find their next step
without having to ask in chat.

Closes cross-rs#1447.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
@c-tonneslan c-tonneslan requested a review from a team as a code owner May 16, 2026 23:36
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.

Improve error message on CI when target = MSVC or Darwin and target = host

1 participant