-
Notifications
You must be signed in to change notification settings - Fork 53
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
ARM64/aarch64 support #980
Comments
Issue is related to #978 |
Does Nim itself support it? |
Yes, it is on the list of supported platforms and I myself was able to compile and run tests with Nim 2.0 on Apple M1. |
Not sure about Nim 2.0, but I believe Nim 1.6 runs on my Apple M1 with amd64 emulation. |
How did you install Nim? |
libp2p and nim both run on native apple m series chips without a hitch and people have been running it on RasPi as part of nimbus for at least a couple of years now. Support for an arm64 CI, is a different matter altogether, if this is what this issue is about, it should be clarified, otherwise it gives the impression that arm support is missing, which is definitely not the case. |
Nimbus' CI indirectly covers mac/arm64: https://ci.status.im/job/nimbus-eth2/job/platforms/job/macos/job/aarch64/ - a similar job can be set up for libp2p itself trivially |
brew install nim This defaults to 2.0 |
It's great to see that Nimbus benefits from nim-libp2p and also serves as the reference application. As contributors to nim-libp2p, we develop our own tests, and we aim to provide factual evidence that it can run independently on modern platforms. When we build enough knowledge about platforms specifics, we might show case optimized use cases, perhaps with Waku? |
It's usually not a good idea to use os level pre-build packages, neither for local development, nor for CI. For CI, you want to build from source (as we should be already doing, if not it should be fixed), for local development use one of the provided environment managers, currently I'm aware of two https://github.com/dom96/choosenim which seems to have been recently abandoned and is not shipping arm builds and a nim plugin for asdf https://github.com/asdf-community/asdf-nim, which does install/ship arm supported binaries. I do not think we yet support nim 2.0, so we should not be using it until we deem the release 2.0 stable. |
Yes, I'm well aware, my team (and @arnetheduck ) wrote most of the initial implementation.
Seems like there is a solution that already exists as part of the Nimbuis build, we should try to use it here as well. We've been also looking into building on arm as part of Codex, perhaps @veaceslavdoina might be of assistance here as well. |
Codex builds now done using GitHub Actions and we are using BuildJet for ARM, because ARM runners support will be added just in 2024, in private beta. |
I used choosenim. Installed 1.6.16 today:
|
I asked cause I also didn't find arm images here https://hub.docker.com/r/nimlang/nim/tags?page=1 |
This is valuable piece of information. Thanks a lot. |
Your are right. Once this issues is in full motion, we would need to figure out how to build Nim and Nimble from sources on ARM. If we follow our current CI workflow practice. |
Thanks for sharing. What makes you think Nim 2.0 is not stable ? |
Its a new release and usually things take time to stabilize, status projects tend to run on older versions that are battle tested, which isn't the case with 2.0. That is not to say that we don't want to test it with 2.0, but instead run against different nim versions. Btw, have you looked into how the current build system is setup? It already supports building from a compiled version of nim - https://github.com/status-im/nim-libp2p/blob/unstable/.github/actions/install_nim/action.yml
@diegomrsantos - choose nim doesn't support arm binaries and has been largely abandoned, I've since switched to https://github.com/asdf-community/asdf-nim which does support apple silicon. |
@dryajov thanks! Does it install nimble too? |
@dryajov could you please elaborate more on this? |
yes |
Its harder (if not impossible) to switch versions with os level installations. Usually if the language ecosystem provides an environment manager, it is much more practical to use with difference language versions. This is usually what you want when developing software. |
|
@dryajov ah you mean using package managers like |
@romanzac can we clarify this issue a bit more.
As mentioned previously, libp2p supports (many) arm chips out of the box, this issue gives the impression that it doesn't, which is certainly not the case. Can you clarify in the description:
|
I think we can close the issue. The issue is choosenim doesn't support ARM. |
I welcome any proposal which positively impacts adoption of nim-libp2p. Feel free to propose your own view and steps how this issue should be resolved. There will be daily tests using CI workfows at very minimum. |
That's kind of a non answer, could you provide the details I requested? |
At this time I see my answers sufficient. Thanks for your comment. |
@dryajov I believe this issue is for having arm support on CI. |
Thanks for clarifying @diegomrsantos. It would still be great to add a bit more context, I think there's been sufficient feedback to be able to substantially improve the issue. For clarity and consistency, I would still suggest we add something that resembles #980 (comment). |
@romanzac could you please update the issue description with the points below?
|
The main purpose of the issue is to add CI/test coverage of these platforms (only with that we can really claim support). @romanzac let's make this explicit in the OP. @arnetheduck
We will do this as a simple solution for now. Also thanks to @dryajov , @mratsim , @veaceslavdoina for your input on this issue 🙏 . I'd prefer to leave this issue open, and link it on the roadmap, to track full arm64 test and CI coverage. We will refine the OP to avoid confusion:
|
Related to #993 |
ARM64 is recently gaining ground on the formerly leading AMD64 architecture due to its greater efficiency, offering better performance per watt.
Adding support for ARM64 would enable operators, developers, and researchers to:
Actual steps to resolve this issue:
Selected platforms:
The text was updated successfully, but these errors were encountered: