mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-05-09 09:10:03 -04:00
78d6b6f7dd
## Summary - Update the experimental NativeAOT-LLVM build path (`EXPERIMENTAL_WASM_AOT=1`) to include all host function imports from ABI versions 10.0 through 10.4 - Fix the compiler package reference to work on both Windows x64 and Linux x64 (was hardcoded to Windows only) - Add a CI smoketest to verify AOT builds work on Linux x64 ## Context See #4514 for the full writeup on the C# AOT situation. The `wasi-experimental` workload that all C# module builds depend on is deprecated and removed from .NET 9+. NativeAOT-LLVM is the recommended path forward for ahead-of-time compilation of C# to WebAssembly. The existing NativeAOT-LLVM support (added by RReverser in #713) was stale: missing imports added since then and a Windows-only package reference. ## Changes **`SpacetimeDB.Runtime.targets`:** - Add 10 missing `WasmImport` declarations across spacetime_10.0 through 10.4 - Replace `runtime.win-x64.Microsoft.DotNet.ILCompiler.LLVM` with `runtime.$(NETCoreSdkPortableRuntimeIdentifier).Microsoft.DotNet.ILCompiler.LLVM` so it resolves correctly on Linux x64 as well - Use explicit version strings instead of the `$(SpacetimeNamespace)` variable **`ci.yml`:** - Add AOT build smoketest step in the `csharp-testsuite` job ## Test plan - [x] CI smoketest passes: `EXPERIMENTAL_WASM_AOT=1 dotnet publish -c Release` builds successfully on Linux x64 - [ ] Existing C# tests continue to pass (no changes to the default interpreter path) --------- Signed-off-by: Ryan <r.ekhoff@clockworklabs.io> Co-authored-by: Ryan <r.ekhoff@clockworklabs.io> Co-authored-by: Jason Larabie <jason@clockworklabs.io> Co-authored-by: John Detter <4099508+jdetter@users.noreply.github.com>
⚠️ Unstable Project ⚠️
The interface of this project is not stable and may change without notice.
See the C# module library reference and the C# client SDK reference for stable, user-facing documentation.
Internal documentation
These projects contain the SpacetimeDB SATS typesystem, codegen and runtime bindings for SpacetimeDB WebAssembly modules. It also contains serialization code for SpacetimeDB C# clients.
The BSATN.Codegen and BSATN.Runtime libraries are used by:
- C# Modules
- and C# Client applications.
Together they provide serialization and deserialization to the BSATN format. See their READMEs for more information.
The Codegen and Runtime libraries are used:
- only by C# Modules.
They provide all of the functionality needed to write SpacetimeDB modules in C#. See their READMEs for more information.