Better `musl` detection

Author: corrideatCreated Aug 26, 2026Updated Aug 27, 2026

Problem

Background

Currently, lib/binding.js has a function called isLinuxMusl with the following check:

return process.platform === 'linux' && !process.report.getReport().header.glibcVersionRuntime;

Due to https://github.com/denoland/deno/issues/33948 (since apparently fixed), Deno will report a value for glibcVersionRuntime, causing this check to be ineffective. Even though the issue in Deno seems to have been fixed, Alpine ships Deno 2.7.4-r2, which doesn't include the fix.

Logic

While Deno is incorrect to report a value for process.report.getReport().header.glibcVersionRuntime when there's none, it also doesn't necessarily follow that if a system is not using glibc, then it must be using musl (realistically, I grant this is a fair assumption).

Solution

Perhaps the check for musl can be done in a way that explicitly checks for it.