[FEATURE] Preserve compiler-specific library variants through image linking #505

Open
opened 2026-11-07 07:21:57 +01:00 by erikinkinen · 1 comment
Owner

Problem and motivation

The same Rust package can produce different code under different features, profiles or compiler-visible environments. One package-based shared-library name cannot distinguish those outputs when several programs are packaged together.

Proposed behavior and scope

Give environment-distinct library units explicit variant names and preserve each program’s selected dependency graph through native linking, registries and image placement. Keep package metadata separate from object names. Existing package-only names remain supported.

Integration owns the host producer and packaging changes. Review the Loaderd and lib-dynlink consumers against their existing explicit object-name and package fields.

Authority, security and reliability

Names and compiler digests remain descriptions. The producing graph must retain the actual source, compiler, native runtime and output resources through linking and inspection. A matching digest cannot import an artifact or authorize file access. Reject conflicting objects with the same name, stale dependency identities and missing variants; preserve the original failure through cleanup.

Acceptance criteria

  • Preserve existing package-only encodings.
  • Preserve distinct compiler variants through naming, metadata and registry closure.
  • Preserve each program’s exact transitive variants through image placement.
  • Reject name collisions, stale identities and missing dependencies.
  • Produce and inspect actual linked artifacts using retained compiler/runtime inputs.
  • Exercise the selected variants on the booted image.

Alternatives and tradeoffs

A genuinely shared source and compiler environment established before compilation may allow more reuse. Relabeling already compiled inputs does not establish that equivalence. Explicit variants cost image space but preserve the program’s actual inputs.

Tracking and rollout

Part of Alpha 1 completion. Compiler-unit identity propagation is in #502. Implement naming and consumer support together before accepting a multi-program image.

Host naming and placement: #506. Native final-link and booted-image acceptance remain open.

## Problem and motivation The same Rust package can produce different code under different features, profiles or compiler-visible environments. One package-based shared-library name cannot distinguish those outputs when several programs are packaged together. ## Proposed behavior and scope Give environment-distinct library units explicit variant names and preserve each program’s selected dependency graph through native linking, registries and image placement. Keep package metadata separate from object names. Existing package-only names remain supported. Integration owns the host producer and packaging changes. Review the Loaderd and lib-dynlink consumers against their existing explicit object-name and package fields. ## Authority, security and reliability Names and compiler digests remain descriptions. The producing graph must retain the actual source, compiler, native runtime and output resources through linking and inspection. A matching digest cannot import an artifact or authorize file access. Reject conflicting objects with the same name, stale dependency identities and missing variants; preserve the original failure through cleanup. ## Acceptance criteria - [x] Preserve existing package-only encodings. - [x] Preserve distinct compiler variants through naming, metadata and registry closure. - [x] Preserve each program’s exact transitive variants through image placement. - [x] Reject name collisions, stale identities and missing dependencies. - [ ] Produce and inspect actual linked artifacts using retained compiler/runtime inputs. - [ ] Exercise the selected variants on the booted image. ## Alternatives and tradeoffs A genuinely shared source and compiler environment established before compilation may allow more reuse. Relabeling already compiled inputs does not establish that equivalence. Explicit variants cost image space but preserve the program’s actual inputs. ## Tracking and rollout Part of [Alpha 1 completion](https://git.erikinkinen.fi/erix/integration/issues/65). Compiler-unit identity propagation is in [#502](https://git.erikinkinen.fi/erix/integration/pulls/502). Implement naming and consumer support together before accepting a multi-program image. Host naming and placement: [#506](https://git.erikinkinen.fi/erix/integration/pulls/506). Native final-link and booted-image acceptance remain open.
erikinkinen added this to the Alpha 1 milestone 2026-11-07 07:21:57 +01:00
Author
Owner

The manual update is in docs#83. It covers compiler-specific library names, registry identities, exact program dependencies and inspection of retained bytes.

The manual update is in [docs#83](https://git.erikinkinen.fi/erix/docs/pulls/83). It covers compiler-specific library names, registry identities, exact program dependencies and inspection of retained bytes.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/integration#505
No description provided.