rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.02k stars 1.55k forks source link

Cannot Install: Docker Alpine Arm #15004

Open JoshuaBrest opened 1 year ago

JoshuaBrest commented 1 year ago

There doesn't seem to be any builds of alpine with arm. Is there a reason?

### Tasks
- [ ] Make a PR to add alpine arm64 to the build system
lnicola commented 1 year ago

Yes, they wouldn't support proc macros.

JoshuaBrest commented 1 year ago

Yes, they wouldn't support proc macros.

why is that? I have a docker and it's hard to code without intellisence.

lnicola commented 1 year ago

If I recall correctly, the musl loader doesn't support dlopen (loading shared libraries, which proc macros are) for static binaries. I might be wrong, but I think Alpine is using static linking.

JoshuaBrest commented 1 year ago

If I recall correctly, the musl loader doesn't support dlopen (loading shared libraries, which proc macros are) for static binaries. I might be wrong, but I think Alpine is using static linking.

Isn't dlopen the only reason musl loader exists?

https://www.musl-libc.org/intro.html:

Dynamic linking is also efficient; by integrating the entire standard library implementation, including threads, math, and even the dynamic linker itself into a single shared object, most of the startup time and memory overhead of dynamic linking have been eliminated.

lnicola commented 1 year ago

My bad, I thought Alpine only supported static linking. The binary in the VSIX was actually tested on Arch Linux, not Alpine. I managed to run the rust-analyzer-x86_64-unknown-linux-musl server on Alpine after installing libgcc.

Then somebody just needs to do the work of setting up a build for it on CI.

JoshuaBrest commented 1 year ago

Hate to spam but has this been resolved?

sanmai-NL commented 7 months ago

@JoshuaBrest Do you agree on my following findings on aarch64 Alpine Linux:

I don't know how the GitHub releases and Visual Studio Code Marketplace listings are connected, that's why I'm asking for verification.

JoshuaBrest commented 7 months ago

@JoshuaBrest

Do you agree on my following findings on aarch64 Alpine Linux:

  • Installing the rust-analyzer toolchain component works.

  • Installing the Visual Studio Code extension doesn't, since no release artifact for this target was published.

I don't know how the GitHub releases and Visual Studio Code Marketplace listings are connected, that's why I'm asking for verification.

I believe that's how it was when I last used docker with Alpine . I can't say for now because I haven't used it recently.

sanmai-NL commented 7 months ago

It's still the case.