Skip to content

Pack and release XdlSharp and per-platform native packages to nuget.org - #2

Merged
stanoddly merged 3 commits into
mainfrom
nuget-packages
Nov 9, 2026
Merged

stanoddly merged 3 commits into
mainfrom
nuget-packages

Conversation

@botoddly

@botoddly botoddly commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Publishes XdlSharp to nuget.org on every merge to main, without a package that bundles every platform.

Packages

  • XdlSharp: the bindings only, the same for every platform.
  • XdlSharp.Native.<rid>: the XDL runtime of one platform, packed from the XDL release zip: linux-x64, linux-arm64, osx-x64, osx-arm64, win-x64, win-arm64 and browser-wasm.
  • XdlSharp.Native.browser-wasm keeps its archives under buildTransitive/native/ and adds them as NativeFileReference items with --use-port=emdawnwebgpu. Outside runtimes/, NuGet does not copy them into app output. The consumer sets a writable WasmCachePath.

License

XdlSharp uses the zlib license, as XDL does. XdlSharp declares Zlib. Each native package declares the release's THIRD-PARTY-NOTICES.txt as its license file, because the libraries also contain code under other licenses.

Version

<SDL version>.<N>, such as 3.4.20.1. The Release workflow takes N as one more than the highest v3.4.20.<N> tag, pushes the packages through Trusted Publishing as stanoddly, and then tags the commit.

  • Runs queue (queue: max), so no merge's run is cancelled.
  • A commit that a tagged commit of the same SDL version contains is skipped, because the queue does not keep the run order.
  • Before pushing, the run fails when nuget.org already has a package at that version from another commit.
  • Publishing (id-token: write) and tagging (contents: write) are separate jobs.

Other changes

  • XDL_VERSION moves to 3.4.20-4. The headers are unchanged, so the generated bindings are too.
  • tools/XdlRelease.proj takes a list of XDL targets instead of one runtime identifier.
  • The Build workflow runs on every pull request: --check with clang 22, the desktop tests, the browser tests and packing. Then tests/XdlSharp.Package.Tests and tests/XdlSharp.Package.Browser.Tests restore the packed packages and load each library on linux-x64, linux-arm64, win-x64, osx-arm64 and in the browser.
  • The desktop tests build their CMake library in their own obj instead of the current directory.

Verified locally

  • --check passes, the desktop tests pass 15 of 15 and the browser tests pass 14 of 14, from a fresh download of the release.
  • tools/pack.sh packs all 8 packages.
  • A scratch app consuming the local packages ran on linux-x64 and on Mono in the browser under Node. SDL_GetVersion, IMG_Version, TTF_Version and MIX_Version matched the headers.
  • The version step picks the right N from test tags.

Not verified

  • The Release workflow has not run; it runs only on main. The first release creates 8 new package IDs on nuget.org.

@stanoddly
stanoddly merged commit f97b672 into main Nov 9, 2026
7 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