mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-14 09:42:37 -04:00
The 'Release pnpm (Rust)' workflow failed on the musl legs with "cannot produce cdylib for pacquet-napi ... as the target x86_64-unknown-linux-musl does not support these crate types". musl targets link the CRT statically by default (crt-static), which is incompatible with the cdylib crate type used by the .node addon. Pass '-C target-feature=-crt-static' when building the addon, but only for musl targets, so it links dynamically against musl libc at load time - matching how napi-rs builds its musl prebuilds. The CLI binary is built in a separate step and keeps crt-static, so it stays fully static for portability across musl distros.