Skip to content

feat(oxide-artifacts): add strong anchor-only host objects, bump to 0.2.2 - #1446

Open
dundysm wants to merge 1 commit into
NVIDIA:mainfrom
dundysm:oxide-artifacts-strong-anchor
Open

dundysm wants to merge 1 commit into
NVIDIA:mainfrom
dundysm:oxide-artifacts-strong-anchor

Conversation

@dundysm

@dundysm dundysm commented Oct 8, 2026 •

Copy link
Copy Markdown

Summary

Adds the strong anchor-only writers that #1372 needs and bumps oxide-artifacts to 0.2.2, so the backend change in #1372 can consume them from crates.io.

The backend builds against the crates.io release, not the in-tree crate. #1372 called these functions directly, so it could not compile against 0.2.1. This splits the release part out, following the order in check-oxide-artifacts-parity.sh: bump, publish, then repoint and relock.

Change

  • build_host_strong_anchor_object_for_target(target, anchor): an anchor-only host object whose anchor is a strong global definition, the same binding a full .oxart embed gives it. There is no .oxart payload, so discovery finds no bundle.
  • build_host_strong_anchor_object_for_target_with_legacy_anchor(target, anchor, legacy): the same, plus a weak legacy alias. This matches the bindings of build_host_object_for_target_with_legacy_anchor.
  • build_host_anchor_object_for_target is unchanged (still weak). All three share one private helper that takes the binding strength.
  • version = "0.2.2". The API is additive, so it is a patch bump. cuda-oxide/Cargo.lock only picks up the member's new version.

Why the backend needs it (#1365): a selected library whose #[cuda_module] only has generic kernels it does not monomorphize still gets the anchor keep-alive reference from the macro. The backend has to define that anchor without embedding a bundle, and with the same strong binding as a full embed, so archive member extraction behaves the same.

Release steps

  1. This PR: the API and the in-tree bump. Until 0.2.2 is published, oxide-artifacts release parity will report that the in-tree version (0.2.2) is ahead of the manifests and locks (0.2.1). That is the expected state between bump and publish.
  2. Maintainer: publish oxide-artifacts 0.2.2 from this head (cargo publish -p oxide-artifacts@0.2.2 from cuda-oxide/; the dry run packages cleanly).
  3. After the release I will push a second commit here that moves the requirement to 0.2.2 in cuda-oxide/Cargo.toml and cuda-oxide/crates/rustc-codegen-cuda/Cargo.toml and relocks every lock with scripts/sync-example-locks.sh, so the parity guard is green before merge. If you prefer to relock yourselves, that works too.
  4. fix(cuda-macros,codegen): keep all-generic library .oxart via #72 anchor #1372 then carries only the backend, macro, and example change on top of 0.2.2.

Test plan

  • cargo test -p oxide-artifacts --all-targets --features object (24 passed, 2 new)
  • cargo clippy -p oxide-artifacts@0.2.2 --all-targets -- -D warnings, with and without --features object
  • cargo fmt --all -- --check
  • RUSTDOCFLAGS="-D warnings" cargo doc -p oxide-artifacts@0.2.2 --no-deps --features object
  • cargo publish --dry-run -p oxide-artifacts@0.2.2
  • cargo deny check for the host, SIMT, and backend workspaces, plus check-example-license-policy.sh
  • all other cuda-oxide/scripts/check-*.sh pass; parity fails as described above
  • the fix(cuda-macros,codegen): keep all-generic library .oxart via #72 anchor #1372 backend (rustc-codegen-cuda) passes cargo check, cargo clippy --all-targets -- -D warnings, and cargo test against this crate via a local [patch.crates-io]

Reviewers

cc @nihalpasham (published 0.2.1) @xavierforge (#72 anchor and embedding owners, same as #1372)

….2.2

Add two writers next to build_host_anchor_object_for_target:

* build_host_strong_anchor_object_for_target defines the artifact link
  anchor as a strong global symbol in the anchor section, with no .oxart
  payload.
* build_host_strong_anchor_object_for_target_with_legacy_anchor does the
  same with a weak legacy alias, matching the symbol bindings of
  build_host_object_for_target_with_legacy_anchor for full embeds.

The existing weak anchor-only writer is unchanged; both share one helper
that takes the binding strength.

The backend needs these for issue 1365: a selected library whose
cuda_module only has generic kernels it does not monomorphize still gets
the anchor keep-alive reference from the macro, so it must define the
anchor without embedding a bundle (PR 1372).

The API is additive, so this is a patch bump. Per
check-oxide-artifacts-parity.sh the release then gets published and the
SIMT and backend requirements move to 0.2.2 with a relock.

Tests: two new object tests check the strong binding, the weak legacy
alias, and that discovery still finds no artifact bundle.

Signed-off-by: Dundy Pasupuleti <dundysm@gmail.com>
@dundysm
dundysm requested a review from nihalpasham as a code owner October 8, 2026 03:02
@copy-pr-bot

copy-pr-bot Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added the cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book label Oct 11, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants