Skip to content

Support AOT - #706

Open
Egbert-Jan wants to merge 4 commits into
dotnet:masterfrom
Egbert-Jan:feature/support-aot
Open

Support AOT#706
Egbert-Jan wants to merge 4 commits into
dotnet:masterfrom
Egbert-Jan:feature/support-aot

Conversation

@Egbert-Jan

Copy link
Copy Markdown

No description provided.

@Egbert-Jan

Copy link
Copy Markdown
Author

@dotnet-policy-service agree

@HofmeisterAn

Copy link
Copy Markdown
Contributor

Hi 👋, just a quick heads-up: This repo is pretty inactive. We've forked it and are taking care of maintenance, bug fixes, and new features. If you'd like to make this PR compatible with our forked version, I'd be happy to review and merge it.

Here are a few things I noticed after a quick look:

  • Doesn't it require project-level AOT configuration?
  • Ideally, we should generate the DockerDotnetJsonSerializerContext.Generated.cs file using the Go implementation that already generates the model classes.
  • Some things were removed, and I'm not sure why, but we can discuss that in a PR on the forked version.

Thanks for contributing, really appreciate the effort.

gcelet added a commit to gcelet/DockYARP that referenced this pull request Aug 23, 2026
…rep items

Native AOT compiles today (dotnet publish -p:PublishAot=true, exit 0) and would start
~2.2x faster (~209ms vs ~467ms JIT, measured median of 3 runs) at nearly the same
published size — but emits 414 trim/AOT warnings across three sources: DockYarp.Dashboard's
Razor Pages usage (~228, Microsoft documents this as unsupported), Docker.DotNet's
Newtonsoft.Json/reflection surface (~135+3), and DockYarp.Docker's YamlDotNet label
parsing (~36). ReadyToRun was also measured as a fallback: only ~11% faster than JIT
and a larger published output (120MB vs 112MB) — not worth adopting on its own.

First pass treated Docker.DotNet as the one blocker outside DockYarp's control (no
release since 2023, no public JsonSerializerOptions override point, dotnet/Docker.DotNet#689
unanswered since 2024). A second pass, prompted by dotnet/Docker.DotNet#706 and its
review thread, found testcontainers/Docker.DotNet: an actively maintained fork
(NuGet package Docker.DotNet.Enhanced, releases through 2026-06) that already declares
IsAotCompatible=true and has fully dropped Newtonsoft.Json.

Net result: none of the three warning sources is a hard blocker anymore, all three
have a concrete DockYarp-side fix. Opens three backlog items (fix-yamldotnet-aot-trim,
migrate-dashboard-to-razorslices, migrate-to-docker-dotnet-enhanced) to do that work
incrementally. Native AOT itself stays deferred — JIT publish remains the default —
until all three land and this spike's measurement is re-run to confirm.
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