Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows #82

Merged
merged 7 commits into from
Oct 21, 2021
Merged

Support Windows #82

merged 7 commits into from
Oct 21, 2021

Conversation

Integralist
Copy link
Contributor

@Integralist Integralist commented Oct 19, 2021

NOTE: I also refactored the workflow to use a 'matrix' so build-linux and build-mac becomes build.

@jedisct1
Copy link
Contributor

One last issue left :)

All the arm64 builds (Windows, Linux, macOS) are for the wrong architecture. They all appear to be x86_64 builds.

@Integralist
Copy link
Contributor Author

re:

All the arm64 builds (Windows, Linux, macOS) are for the wrong architecture. They all appear to be x86_64 builds.

Silly question, but what should they be? Is this related to the value assigned where the build calls with.target: ${{ matrix.rust-target }} ?

If so, looking at the configuration:

        os: [ubuntu-latest, macos-latest, windows-latest]
        arch: [amd64, arm64]
        include:
          - os: ubuntu-latest
            name: linux
          - os: macos-latest
            name: darwin
            rust-target: x86_64-apple-darwin
          - os: windows-latest
            name: windows
            extension: .exe

This reads as create a build job for:

  1. ubuntu-latest for both amd64 & arm64 architectures.
  2. macos-latest for both amd64 & arm64 architectures + set rust-target to x86_64-apple-darwin.
  3. windows-latest for both amd64 & arm64 architectures.

So should there be a rust-target set for the other OS' under include:?

I presumed the result of not setting rust-target for Ubunu or Windows would have been an empty string when interpolating ${{ matrix.rust-target }} into with.target, but maybe they need an explicit key to be set to an empty value?

Or maybe I'm just confused by what needs to be done (very likely) 😬

@jedisct1
Copy link
Contributor

My guess is that rust-target only runs the rustup target add command.

The project will still be compiled for the default target.

Even when arch is arm64, the host is still an x86_64 machine and the x86_64 toolchain is installed.

@jedisct1
Copy link
Contributor

You can add --target=<triple>. But there are also dependencies on C and assembly code (ex: wasmtime-fiber), so cross-compilation is not going to work unless you install an additional toolchain.

Long story short, we have to use qemu in order to build the ARM packages.

Compiling for multiple targets is not always as easy as in Zig and Go :)

I can work on this. Meanwhile, maybe we should just remove the arm64 packages, since they don't run on arm64.

@Integralist
Copy link
Contributor Author

Meanwhile, maybe we should just remove the arm64 packages, since they don't run on arm64.

OK cool, I'll remove arm64.

@Integralist Integralist merged commit 1bb1004 into main Oct 21, 2021
@Integralist Integralist deleted the integralist/window-builds branch October 21, 2021 13:51
@cratelyn cratelyn mentioned this pull request Oct 21, 2021
@cratelyn cratelyn added the ci Relates to continuous integration label Nov 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Relates to continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants