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

Create win-arm64 launchers #4

Closed
jaimergp opened this issue Aug 29, 2024 · 5 comments
Closed

Create win-arm64 launchers #4

jaimergp opened this issue Aug 29, 2024 · 5 comments

Comments

@jaimergp
Copy link
Contributor

Current scripts only support win-64. We rely on MSYS2 compilers for this (m2w64-toolchain_win-64 in conda-forge). Unfortunately there's no m2w64-toolchain_win-arm64 yet. We could maybe use the MSVC compilers (vs_win-arm64), but there's this warning in the build scripts:

# You *could* use MSVC 2008 here, but you'd end up with much larger (~230k) executables.
# cl.exe -opt:nowin98 -D NDEBUG -D "GUI=0" -D "WIN32_LEAN_AND_MEAN" -ZI -Gy -MT -MERGE launcher.c -Os -link -MACHINE:x64 -SUBSYSTEM:CONSOLE version.lib advapi32.lib shell32.lib

Maybe it's a good temporary workaround?

Also, I'm not sure, but shouldn't Windows be able to emulate the x64 launchers just fine?

@wolfv
Copy link

wolfv commented Sep 2, 2024

Awesome!
Yes, I am also wondering about the emulation. Could be that it just works. On the other hand, native would be nicer.

We could also try to compile via zig :)

Or maybe newer MSVC versions have gotten better? Who knows.

@chawyehsu
Copy link
Contributor

chawyehsu commented Nov 6, 2024

I've just successfully migrated the project to use rattler-build and built the launchers for win-arm64 by leveraging the great Zig build system. The work was done and tested on my Windows ARM laptop. See: chawyehsu/conda-recipes@7d5f33f

The executable size is around 50KB as I can see, the .conda artifacts are available in the CI run.

If it sounds good I'm willing to PR send it back to this repo.

There's one question, I wonder if the launchers would be distributed as a conda-launchers package, and if it is then should it be noarch and pack all launchers for different architectures.

@wolfv
Copy link

wolfv commented Nov 6, 2024

Awesome work @chawyehsu - I would LOVE to use that in rattler.

@jaimergp
Copy link
Contributor Author

jaimergp commented Nov 6, 2024

Zig to the rescue! Thanks for the initiative! A PR is indeed more than welcome. Please open one but leave the meta.yaml in place for backwards compatibility.

Not sure about the noarch question. Maybe yes, maybe not? We can make them noarch:generic but name them like we do with compilers (e.g. with a platform suffix) so folks can co-install several of them, I guess?

@jaimergp
Copy link
Contributor Author

Closed by #7 and #9

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

No branches or pull requests

3 participants