Stream: compiler development

Topic: linux always musl?


view this post on Zulip Anton (Nov 28 2025 at 16:32):

Do we always want to use musl for linux? Fine by me, it was just a bit surprising so I wanted to be sure.
This is from current main branch:

pub fn build(b: *std.Build) void {
    // build steps
    ...

    // general configuration
    const target = blk: {
        var default_target_query: std.Target.Query = .{
            .abi = if (builtin.target.os.tag == .linux) .musl else null,
        };

view this post on Zulip Richard Feldman (Nov 28 2025 at 17:20):

I don't think there's much downside is there?

view this post on Zulip Richard Feldman (Nov 28 2025 at 17:21):

as I understand it the main downside is that musl's allocators are slow, but I assume we are (or will be) using zig allocators anyway

view this post on Zulip Anton (Nov 28 2025 at 17:23):

I remember I could not access file metadata with basic-cli built with musl: https://roc-lang.github.io/basic-cli/0.20.0/File/#time_accessed!
But yeah, musl simplifies things a lot for now, we can always change it later if we absolutely need to.

view this post on Zulip Brendan Hansknecht (Nov 28 2025 at 17:58):

The goal was musl by default

view this post on Zulip Brendan Hansknecht (Nov 28 2025 at 17:58):

You can still explicitly build for glibc

view this post on Zulip Brendan Hansknecht (Nov 28 2025 at 17:59):

More static by default is nice


Last updated: Dec 21 2025 at 12:15 UTC