Skip to content

fix: build Linux Rust plugins for glibc and musl - #14

Merged
mnajafian-nv merged 3 commits into
mainfrom
fix/linux-plugin-libc-builds
Oct 7, 2026
Merged

mnajafian-nv merged 3 commits into
mainfrom
fix/linux-plugin-libc-builds

Conversation

@willkill07

@willkill07 willkill07 commented Oct 7, 2026 •

Copy link
Copy Markdown
Member

Linux Rust plugin bundles need to match Relay's libc and architecture. Build the glibc bundles in pinned manylinux2014 images and add separate musllinux 1.2 bundles for x86-64 and ARM64. Each container runs the plugin's build, release-mode tests, packaging, and installed-bundle smoke test.

  • Add linux-musl-x86_64 and linux-musl-arm64 platforms for the Rust plugins, with image digests matching Relay's CLI packaging.
  • Use explicit Rust targets and update packaging and lifecycle tests to find their artifacts. Native musl plugins and their source-built Relay test hosts disable crt-static so Relay can load the shared library.
  • Keep GNU native libraries mapped with the ELF NODELETE flag. This prevents glibc 2.17 thread-local destructors from executing unloaded Rust code after Relay shuts down a plugin. Plugin callbacks and runtime instances still close normally.
  • Retry transient Git fetch failures up to three times, while failing immediately for invalid revisions. Include the exit code in gateway shutdown errors.
  • Record the build image, Rust target, and dynamic musl host in metadata. Reject Rust Linux release assets with mismatched image or target metadata, and native musl assets without dynamic-host verification.

Related Relay changes: NVIDIA/NeMo-Relay#1242 selects the CLI binary by host libc. NVIDIA/NeMo-Relay#1243 dynamically links musl release packages and selects plugin bundles by the CLI's libc target. The platform names in this PR match that installer mapping. Plugin SDK pins and Relay test-host selectors remain separate.

Validation: 210 shared tests passed (one existing Windows-only test skipped on macOS), and all commit hooks passed. A minimal Rust library reproduction in the pinned manylinux2014 x86-64 image failed with SIGSEGV without NODELETE and exited cleanly with it. The complete native-example pipeline then passed in that same glibc 2.17 image, including lifecycle tests, packaging, and installed-bundle shutdown. The macOS plugin pipelines passed, and the initial CI run passed musl native-plugin loading for both architectures. Updated cross-platform CI passed on commit 79ddfe3: all 25 platform builds, repository checks, and the final plugin check passed. Native-plugin load and shutdown passed on both glibc and musl architectures.

Signed-off-by: Will Killian <wkillian@nvidia.com>
@willkill07
willkill07 requested a review from a team October 7, 2026 14:19
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>

@mnajafian-nv mnajafian-nv left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mnajafian-nv
mnajafian-nv merged commit b2b98e6 into main Oct 7, 2026
29 checks passed
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.

2 participants