Skip to content

ci: add AOT CI validation, public JsonTypeInfo API, and e2e test app#2

Open
cshung wants to merge 1 commit into
SMAH1:AotCompatible2from
cshung:feat/aot-ci-and-typeinfo
Open

ci: add AOT CI validation, public JsonTypeInfo API, and e2e test app#2
cshung wants to merge 1 commit into
SMAH1:AotCompatible2from
cshung:feat/aot-ci-and-typeinfo

Conversation

@cshung

@cshung cshung commented May 22, 2026

Copy link
Copy Markdown

Summary

Follow-up patches on top of the AOT work — adds CI-level validation and a public API for AOT consumers.

Changes

  1. CI AOT checkdotnet publish step in build workflow that catches AOT/trimming analyzer warnings
  2. AOT test app — end-to-end native binary (OrasProject.Oras.AotTest) exercising Manifest, Index, and Descriptor round-trips + successors traversal
  3. OrasJsonTypeInfo — public static class exposing JsonTypeInfo<T> for Manifest, Index, Descriptor, and Platform so AOT consumers don't need their own JsonSerializerContext
  4. Live registry pull test — real HTTP pull from mcr.microsoft.com/hello-world under Native AOT (gated behind ORAS_AOT_LIVE_TEST=1)

Performance (30 iterations, live registry pull)

AOT (native) JIT (dotnet exec)
Mean 255 ms 430 ms
Median 211 ms 423 ms
StdDev 192 ms 28 ms
Min 195 ms 400 ms
Max 1264 ms 517 ms

Median speedup: ~2x — AOT eliminates JIT startup overhead. Higher variance in AOT numbers is from network jitter (the native binary itself starts in <20ms).

Feel free to merge into your branch so these ship together with PR oras-project#378.

- Add dotnet publish step to CI workflow to catch AOT/trimming warnings
- Add OrasProject.Oras.AotTest: native AOT app exercising Manifest,
  Index, and Descriptor round-trips plus successors traversal
- Expose public OrasJsonTypeInfo class with JsonTypeInfo<T> for
  Manifest, Index, Descriptor, and Platform so AOT consumers don't
  need their own JsonSerializerContext
- Add live registry pull test (mcr.microsoft.com/hello-world) gated
  behind ORAS_AOT_LIVE_TEST=1 env var

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: cshung <3410332+cshung@users.noreply.github.com>
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.

1 participant