Rekhoff/reapply update nativeaot llvm infrastructure#4897
Queued
Rekhoff/reapply update nativeaot llvm infrastructure#4897
Conversation
The experimental NativeAOT-LLVM build path (EXPERIMENTAL_WASM_AOT=1) was missing several host function imports added in ABI versions 10.0-10.4, and the compiler package reference was hardcoded to Windows x64 only. Changes to SpacetimeDB.Runtime.targets: - Add missing spacetime_10.0 imports: datastore_update_bsatn, identity - Add all spacetime_10.1 imports: bytes_source_remaining_length - Add all spacetime_10.2 imports: get_jwt - Add all spacetime_10.3 imports: procedure_start_mut_tx, procedure_commit_mut_tx, procedure_abort_mut_tx, procedure_http_request - Add all spacetime_10.4 imports: datastore_index_scan_point_bsatn, datastore_delete_by_index_scan_point_bsatn - Replace hardcoded runtime.win-x64 package reference with runtime.$(NETCoreSdkPortableRuntimeIdentifier) so the AOT compiler package resolves correctly on both Windows x64 and Linux x64 - Use explicit version strings instead of $(SpacetimeNamespace) variable Changes to ci.yml: - Add AOT build smoketest in csharp-testsuite job to verify the NativeAOT-LLVM build path works on Linux x64 See #4514 for full context on the C# AOT situation.
#4601) # Description of Changes * Add dotnet-experimental feed + package source mapping for LLVM packages in `sdks/csharp/tools~/write-nuget-config.sh`, so generated NuGet.Config files include NativeAOT-LLVM prerequisites. * Make LLVM toolchain packages explicit dependencies in `SpacetimeDB.Runtime` to ensure restores succeed even when LLVM dependencies are only referenced through the `.nupkg`. * Import the LLVM targets from the package when `EXPERIMENTAL_WASM_AOT=1` to enable NativeAOT build steps without relying on downstream package reference resolution. # Context Changes are required to get `NativeAOT-LLVM` in #4515 to build correct, but moving the packages closer to the build, to ensure they get into the Nuget restore successfully. Additional changes where needed to `write-nuget-config.sh` to allow `Nuget.Config` files generated with required changes during regression testing. # API and ABI breaking changes None. # Expected complexity level and risk 2 (Low–moderate). Changes are scoped to build/restore infrastructure and package configuration. # Testing - [X] Built CLI locally - [X] Ran `run-regression-tests.sh` without errors --------- Co-authored-by: Jason Larabie <jason@clockworklabs.io>
Signed-off-by: Ryan <r.ekhoff@clockworklabs.io>
…lish` for NativeAOT-LLVM support (#4672) # Description of Changes Adds `--native-aot` flag to `spacetime init` command for creating NativeAOT-LLVM enabled C# projects. This automatically adds the required LLVM package references to the generated `.csproj` file and sets `"native-aot": true` in `spacetime.json`. This also adds `--native-aot` flag to `spacetime publish`. This is optional because the developer will still need to add the required LLVM package references to their `.csproj` file, and the provided instructions also include adding `"native-aot": true` to their `spacetime.json` which will already apply the flag. # API and ABI breaking changes None. # Expected complexity level and risk 1 (Low). Adds new optional flag to init command and post-processing of generated .csproj files. # Testing - [X] Verified `spacetime init --lang csharp --native-aot` creates projects with required LLVM package references - [X] Confirmed `spacetime.json` is generated with `"native-aot": true` - [X] Tested publish command works with both `--native-aot` flag and `spacetime.json` configuration --------- Signed-off-by: Ryan <r.ekhoff@clockworklabs.io> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
This reverts commit 5b47440.
JasonAtClockwork
approved these changes
Apr 27, 2026
Contributor
JasonAtClockwork
left a comment
There was a problem hiding this comment.
LGTM, I ran tests locally and confirmed --native-aot working as intended.
bfops
reviewed
Apr 28, 2026
bfops
approved these changes
Apr 28, 2026
Collaborator
bfops
left a comment
There was a problem hiding this comment.
sounds like my code-owned files are the same as they were in the originally-approved PR, so approving.
the tests seem to all pass on this one, so that works for me 👍
Any commits made after this event will not be merged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Changes
Reapply changes from #4515 after reversion
API and ABI breaking changes
No API or ABI changes
Expected complexity level and risk
2 - This PR change itself is trivial, as it just reimplements #4515, however as #4515 had broken the
quickstartsmoketest, this should be considered when reviewing this PR.Testing
python3 -m smoketests quickstartlocally