cross-toolchains icon indicating copy to clipboard operation
cross-toolchains copied to clipboard

Publish more images

Open mcandre opened this issue 2 years ago • 3 comments

When I try to consume cross-toolchains images, then Docker often complains of missing images from the GHCR.

$ cat Cross.toml
[target.aarch64-pc-windows-msvc]
image = "ghcr.io/cross-rs/aarch64-pc-windows-msvc:local"

$ cross build --target aarch64-pc-windows-msvc
Unable to find image 'ghcr.io/cross-rs/aarch64-pc-windows-msvc:local' locally
docker: Error response from daemon: Head "https://ghcr.io/v2/cross-rs/aarch64-pc-windows-msvc/manifests/local": denied.
See 'docker run --help'.

mcandre avatar Mar 27 '23 21:03 mcandre

You need to build them yourself according to the instructions.

git clone https://github.com/cross-rs/cross
cd cross
git submodule update --init --remote
cargo build-docker-image <target>-cross --tag local

we don't host these images because they are too large, too specific, legal reasons or break often.

Emilgardis avatar Mar 27 '23 22:03 Emilgardis

I am curious.

The Go compiler is able to build Apple targets as a built-in feature. The Go user does not need to manually build Docker images for this.

I'll accept that rustc and cargo do not have the same level of completeness regarding stock cross-compilation ability. But I am unsure why cross[-toolchains] considers it a legal issue to self publish the Docker images. How does Go get away with it? Why can't cross[-toolchains] similarly publish its artifacts?

Is there another way of implementing cross, or of implementing the Docker images, that would allow cross-toolchains to publish its images?

mcandre avatar Apr 01 '23 15:04 mcandre

the issue is republishing the toolchains for c/c++ and linking, go doesn't need to do that because it doesn't use them.

This could maybe be solved with another backend for codegeneration and linking.

So, the problem with MSVC is that Visual Studio isn't distributable, so a docker image with it inside is neither. The problem with Darwin/apple is that the SDK is needed, and we can't distribute that either.

Does that explain it?

Emilgardis avatar Apr 01 '23 15:04 Emilgardis