mirror of
https://github.com/clockworklabs/SpacetimeDB.git
synced 2026-07-24 02:57:23 -04:00
bba6f89e5f
# Description of Changes This is the implementation of #4255 This is a rebuild of #4262 after a rebase throughly messed up that PR's changelog, this time under `master` branch. * Refactored `Module` so all V10 builder state and registration helpers now live on `partial class RawModuleDefV10`. The static `Module` class simply registers components against that builder and serializes via `moduleDef.BuildModuleDefinition()` * Removed the deprecated `__describe_module__` export. Only `__describe_module_v10__` is emitted now across the runtime, native shim, generated bindings, and snapshots * Mirrored the Rust TODO that future V10 sections will cover Event tables and Case-conversion policy so we don't lose track of those items Event Tables will be added once they are finished being implemented. # API and ABI breaking changes Modules built with these bindings now expose only `__describe_module_v10__` The legacy `__describe_module__` symbol is gone from both managed and native layers. Hosts expecting the old export must switch to the V10 entry point (which is already the canonical ABI for 2.0). # Expected complexity level and risk 2 - Low. The refactor keeps the previous builder logic but relocates it, and the export removal matches the already-supported V10 host path. # Testing - [X] Successfully built CLI and DLLs without errors. - [X] Ran `dotnet build crates/bindings-csharp/Runtime/Runtime.csproj` without errors. - [X] Ran `dotnet test crates/bindings-csharp/Codegen.Tests/Codegen.Tests.csproj` without errors. - [X] Ran `bash run-regression-tests.sh` without errors. --------- Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
31 lines
747 B
C#
31 lines
747 B
C#
namespace SpacetimeDB.Internal;
|
|
|
|
using SpacetimeDB.BSATN;
|
|
|
|
public interface IView
|
|
{
|
|
RawViewDefV10 MakeViewDef(ITypeRegistrar registrar);
|
|
|
|
// This one is not static because we need to be able to store IView in a list.
|
|
byte[] Invoke(BinaryReader reader, IViewContext args);
|
|
}
|
|
|
|
public interface IAnonymousView
|
|
{
|
|
RawViewDefV10 MakeAnonymousViewDef(ITypeRegistrar registrar);
|
|
|
|
// This one is not static because we need to be able to store IAnonymousView in a list.
|
|
byte[] Invoke(BinaryReader reader, IAnonymousViewContext args);
|
|
}
|
|
|
|
public interface IViewContext
|
|
{
|
|
public static Identity GetIdentity()
|
|
{
|
|
FFI.identity(out var identity);
|
|
return identity;
|
|
}
|
|
}
|
|
|
|
public interface IAnonymousViewContext { }
|