SpacetimeDB.BSATN.Runtime 1.0.0-rc3-hotfix2

SpacetimeDB.Runtime

This project contains the core SpacetimeDB SATS typesystem, attributes for the codegen as well as runtime bindings for SpacetimeDB WebAssembly modules.

The runtime bindings are currently implementing via Wasi.Sdk package, which is a .NET implementation of the WASI standard. This is likely to change in the future.

While not really documented, it allows to build raw WebAssembly modules with custom bindings as well, which is what we're using here. The process is somewhat complicated, but here are the steps:

  • bindings.c declares raw C bindings to the SpacetimeDB FFI imports and marks them with attributes like __attribute__((import_module("spacetime"), import_name("_insert"))) that make them WebAssembly imports. (unfortunately, function name duplication is currently unavoidable)
  • bindings.c implements a bunch of Mono-compatible wrappers that convert between Mono types and raw types expected by the SpacetimeDB FFI and invoke corresponding raw bindings.
  • Runtime.cs declares corresponding functions with compatible signatures for Mono-compatible wrappers to attach to. It marks them all with [MethodImpl(MethodImplOptions.InternalCall)].
  • bindings.c attaches all those Mono-compatible wrappers to their C# declarations in a mono_stdb_attach_bindings function.
  • bindings.c adds FFI-compatible exports that search for a method by assembly name, namespace, class name and a method name in the Mono runtime and invoke it. Those exports are marked with attributes like __attribute__((export_name("__call_reducer__"))) so that they're exported from Wasm by the linker.
  • Finally, bindings.c implements no-op shims for all the WASI APIs so that they're linked internally and not attempted to be imported from the runtime itself.

The result is a WebAssembly module FFI-compatible with SpacetimeDB and with no WASI imports, which is what we need.

Regenerating RawModuleDef

To regenenerate the Autogen folder, run:

cd ../../cli
cargo run --example regen-csharp-moduledef

Showing the top 20 packages that depend on SpacetimeDB.BSATN.Runtime.

Packages Downloads
SpacetimeDB.ClientSDK
The SpacetimeDB SDK is a software development kit (SDK) designed to simplify the interaction with SpacetimeDB server modules.
7
SpacetimeDB.ClientSDK
The SpacetimeDB SDK is a software development kit (SDK) designed to simplify the interaction with SpacetimeDB server modules.
6
SpacetimeDB.ClientSDK
The SpacetimeDB SDK is a software development kit (SDK) designed to simplify the interaction with SpacetimeDB server modules.
5
SpacetimeDB.ClientSDK
The SpacetimeDB SDK is a software development kit (SDK) designed to simplify the interaction with SpacetimeDB server modules.
4
SpacetimeDB.ClientSDK
The SpacetimeDB SDK is a software development kit (SDK) designed to simplify the interaction with SpacetimeDB server modules.
3

.NET 8.0

  • No dependencies.

.NET Standard 2.1

  • No dependencies.

Version Downloads Last updated
1.11.1 0 12/18/2025
1.11.0 1 12/11/2025
1.10.0 1 12/11/2025
1.9.0 1 12/11/2025
1.8.0 1 12/11/2025
1.7.0 1 12/11/2025
1.6.0 2 10/23/2025
1.5.0 3 10/23/2025
1.4.0 3 10/23/2025
1.3.0 3 09/17/2025
1.2.1 4 07/24/2025
1.2.0 4 07/24/2025
1.1.2 5 06/09/2025
1.1.1 5 06/09/2025
1.1.0 5 06/09/2025
1.0.1 5 06/09/2025
1.0.0 5 06/09/2025
1.0.0-rc3-hotfix3 5 06/09/2025
1.0.0-rc3-hotfix2 5 06/09/2025
1.0.0-rc3 5 06/09/2025
1.0.0-rc2 5 06/09/2025
1.0.0-rc1-hotfix1 5 06/09/2025
1.0.0-rc1 5 06/09/2025
0.12.0 5 06/09/2025
0.11.1 5 06/09/2025
0.11.0 5 06/09/2025
0.10.1 5 06/09/2025
0.10.0 5 06/09/2025