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

Musl LibC Support #918

Closed
theoparis opened this issue Jul 29, 2022 · 16 comments
Closed

Musl LibC Support #918

theoparis opened this issue Jul 29, 2022 · 16 comments
Assignees
Labels
enhancement New feature or request

Comments

@theoparis
Copy link

What is the problem this feature will solve?

It will allow bun to be used in linux distributions such as Alpine Linux or BunOS. This could also potentially solve #255.

What is the feature you are proposing to solve the problem?

I have already attempted to implement this by creating a patched dockerfile, build.zig and makefile for building bun under alpine linux. However, it is missing proper FFI support, which seems to be an issue with the internals of bun (as FFI and static linking seems to work with deno).

What alternatives have you considered?

No response

@theoparis theoparis added the enhancement New feature or request label Jul 29, 2022
@benatkin
Copy link

benatkin commented Nov 15, 2022

Found this closed issue that suggests JavaScript Core may run on musl https://bugs.webkit.org/show_bug.cgi?id=187485

suchipi added a commit to suchipi/quickjs that referenced this issue Sep 9, 2023
but it seems bun only supports glibc; see oven-sh/bun#918
@brynne8
Copy link

brynne8 commented Sep 10, 2023

I'm also using Alpine Linux and being unable to run bun.

@dargmuesli
Copy link

Please add a 👍 to the first post instead of adding "me too" comments 🙏

@notramo
Copy link

notramo commented Sep 27, 2023

WebKit is shipped on some musl Linux distros, which implies support for JavaScriptCore.

@Nyaa97

This comment was marked as off-topic.

@theoparis
Copy link
Author

Why was the above comment marked as "off topic"? It is showing a temporary solution to the issue and it would help contribute torwards a permanent fix in the future.

@brynne8

This comment was marked as off-topic.

@theoparis
Copy link
Author

It would be nice if you could send the patches as well.

@Pyroglyph
Copy link

I need motivation to write a "normal" patch

@Nyaa97 Would it not have been faster to type git diff and paste the result here instead of typing out all the steps?

That aside, do you still have your working code that you could share here?

@madmoizo
Copy link

This issue/feature request is the most upvoted and probably the most viewed by people trying to get Bun works on Alpine but lack an official statement from the core team about the plans around it.

Is the progress on this feature blocked by other issues? Is it complex/time consuming to do? Is it complex to maintain? Is it just low priority? Is it on the 2025 roadmap?

Thanks a lot, can't wait to use Bun on Alpine.

@Nyaa97
Copy link

Nyaa97 commented Oct 17, 2024

I have updated my patch to musl, but it still needs some tweaking
If anyone is willing to help, I would be grateful
musl branch

@slogivewd
Copy link

Im waiting the feature to be supported as well

@madmoizo
Copy link

Good news everyone!

Image

At some point, I will create a bot to match Jarred's tweet with github issues

@nektro
Copy link
Member

nektro commented Nov 19, 2024

This is now in a state we're happy with and will be available as of Bun v1.1.35, which will be out tomorrow Tue Nov 19 🎊

@nektro nektro closed this as completed Nov 19, 2024
@Hazmi35
Copy link

Hazmi35 commented Nov 21, 2024

What about adding linuxmusl to CompileTarget?

Running bun build --compile --sourcemap --minify --target bun-linux-x64-modern src/index.ts on Alpine will fail with:

error: Unsupported compile target: bun-linux-x64-musl-v1.1.36

@nektro
Copy link
Member

nektro commented Nov 21, 2024

let's track that in a new issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests