Skip to content

Publish more images #32

Open
Open
@mcandre

Description

@mcandre

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'.

Activity

Emilgardis

Emilgardis commented on Mar 27, 2023

@Emilgardis
Member

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.

mcandre

mcandre commented on Apr 1, 2023

@mcandre
Author

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?

Emilgardis

Emilgardis commented on Apr 1, 2023

@Emilgardis
Member

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?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @mcandre@Emilgardis

        Issue actions

          Publish more images · Issue #32 · cross-rs/cross-toolchains