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

Add release binaries for x86_64-musl #8668

Merged
merged 2 commits into from
May 21, 2024

Conversation

alexcrichton
Copy link
Member

This was requested in bytecodealliance/wasmtime-py#237 and shouldn't cost us too much in terms of CI resources and maintenance overhead.

This was requested in bytecodealliance/wasmtime-py#237 and shouldn't
cost us too much in terms of CI resources and maintenance overhead.
@alexcrichton alexcrichton requested review from a team as code owners May 21, 2024 00:26
@alexcrichton alexcrichton requested review from elliottt and removed request for a team May 21, 2024 00:26
@alexcrichton alexcrichton added this pull request to the merge queue May 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 21, 2024
@alexcrichton alexcrichton enabled auto-merge May 21, 2024 00:44
@alexcrichton alexcrichton added this pull request to the merge queue May 21, 2024
@whitequark
Copy link
Contributor

Thanks again =^__^=

This will improve the compatibility story for YoWASP and the Glasgow Interface Explorer to even more Linux distributions.

Merged via the queue into bytecodealliance:main with commit cc93e8f May 21, 2024
117 checks passed
@alexcrichton alexcrichton deleted the musl-binaries branch May 21, 2024 01:12
alexcrichton added a commit to alexcrichton/wasmtime-py that referenced this pull request May 21, 2024
alexcrichton added a commit to bytecodealliance/wasmtime-py that referenced this pull request May 21, 2024
* Add a wheel for `musllinux_1_2_x86_64`

Use binaries from bytecodealliance/wasmtime#8668 to add a musl wheel.

cc #237

* Fix download script

* Comment different version of version used for musl

* Simplify installation of wasm-tools on CI

* Don't cache the registry any more

Cargo's default heuristics nowadays are better than the caching.

* Update some github actions versions
@aambrose-sonatus
Copy link

Hi @alexcrichton, I'm curious about a couple things here regarding musl support:

  1. What is the wasmtime dependency on libgcc? Is this something core, or just how the toolchain is structured right now?
  2. What is the limitation that is preventing wasmtime from being fully static with musl libraries? Is it the above libgcc dep?

Thank you

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 3, 2024

For usage in C we compile a wasmtime.so dynamic library. Producing a dynamic library is incompatible with statically linking libc. The musl based binaries also seem to be meant for usage on musl based distros where statically linking libc only has disadvantages. (bigger binaries, not getting security updates to libc)

@aambrose-sonatus
Copy link

Is there anything that precludes compiling the static library version of the embedding (IE libwasmtime.a) as fully static? Perhaps not as an official release artifact, but e.g. when compiling from source oneself or when using wasmtime as a crate dependency for some other binary?

@bjorn3
Copy link
Contributor

bjorn3 commented Jul 4, 2024

If you compile it yourself, I don't see why it shouldn't work.

@alexcrichton
Copy link
Member Author

I think that the libwasmtime.a artifact for x86_64-musl should be usable to build a static binary, but I haven't tested that myself. Otherwise though our distribution doesn't have any static binaries for Linux mostly just because no one's asked for it and it's otherwise easier to keep everything built similarly (and all other platforms use dynamic linking)

@bjorn3 is right though in that when building yourself you should have any option you need available to you for target/static linking/etc.

@aambrose-sonatus
Copy link

Yeah it seemed to be working on my end; I used zig as the C toolchain so I get full static outputs by default. My questions were more regarding the statement they are not suitable for "run on any linux distribution" style use cases and whether this applied to all source builds, or only the publicly released artifacts. It sounds like it's the latter.

Thank you both!

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

Successfully merging this pull request may close these issues.

5 participants