v2.6.0
datalab-to/suryav2.6.0Jun 16, 2026by rekhoff
AI Summary
Adds Primary Key support for Views across Rust, TypeScript, and C#, introduces commitlog configuration knobs, and enables ARM cross-compilation.
Key Highlights
- Primary Key support for procedural views in Rust, TypeScript, and C#
- Commitlog configuration knobs (max_segment_size, write_buffer_size) for performance
- Cross-compile CLI binaries for ARM architecture
- Timestamps can now be used as primary keys in C#
New Features
- Primary Key support for procedural views
- Commitlog configuration options
- ARM cross-compilation for CLI binaries
- Timestamp primary keys in C#
- Layout-altering automigrations for event tables
Full Release Notes
2.6.0 adds Primary Key support for Views in Rust, TypeScript, and C#, improves event table automigrations, includes CLI binary distribution improvements, and brings various performance enhancements and bug fixes.
## Features
### Primary Key support for Views (Rust, TypeScript, and C#)
Procedural views now support primary keys in Rust, TypeScript, and C#
> **Note:** C++ support for primary keys in views will be added in a future release.
- **Rust**: Declare primary keys in the `#[view]` macro:
```rust
#[spacetimedb::view(accessor = my_players, public, primary_key = id)]
pub fn my_players(ctx: &spacetimedb::ViewContext) -> Vec<Player> {
ctx.db.players().owner().filter(ctx.sender()).collect()
}
```
([#5111](https://github.com/clockworklabs/SpacetimeDB/pull/5111))
- **TypeScript**: Declare primary keys at the column/row level:
```typescript
const Player = t.row('Player', {
id: t.u64().primaryKey(),
owner: t.identity().index('btree'),
name: t.string(),
});
export const my_players = spacetimedb.view(
{ public: true },
t.array(players.rowType),
ctx => Array.from(ctx.db.players.owner.filter(ctx.sender))
);
```
([#5111](https://github.com/clockworklabs/SpacetimeDB/pull/5111))
- **C#**: Following Rust and TypeScript support in previous releases, C# modules can now declare primary keys on procedural views:
```csharp
[SpacetimeDB.View(primaryKey: nameof(Player.Id))]
public static List<Player> MyPlayers(ViewContext ctx) => ...
```
([#5246](https://github.com/clockworklabs/SpacetimeDB/pull/5246))
## Performance & Correctness
- **Commitlog configuration knobs**: Added `max_segment_size`, `write_buffer_size`, and `preallocate_segments` configuration options to `config.toml` for the commitlog. The default `write_buffer_size` has been increased from `8KiB` to `128KiB` to optimize high-throughput workloads.
([#5074](https://github.com/clockworklabs/SpacetimeDB/pull/5074))
## Bug Fixes
- **Timestamp primary keys in C#**: Timestamps can now be used as primary keys in C# modules, making C# consistent with the other module languages.
([#5262](https://github.com/clockworklabs/SpacetimeDB/pull/5262))
## What's Changed
- Cross compile CLI binaries for ARM by @bfops in [#5176](https://github.com/clockworklabs/SpacetimeDB/pull/5176)
- Client binaries from DigitalOcean -> AWS by @bfops in [#5077](https://github.com/clockworklabs/SpacetimeDB/pull/5077)
- Add commitlog knobs to server config by @joshua-spacetime in [#5074](https://github.com/clockworklabs/SpacetimeDB/pull/5074)
- Add primary key support for procedural views to rust and ts modules by @joshua-spacetime in [#5111](https://github.com/clockworklabs/SpacetimeDB/pull/5111)
- Timestamps can be primary keys in C# by @joshua-spacetime in [#5262](https://github.com/clockworklabs/SpacetimeDB/pull/5262)
- Add primary keys to procedural views in C# by @joshua-spacetime in [#5246](https://github.com/clockworklabs/SpacetimeDB/pull/5246)
- Allow layout-altering automigrations of event tables by @gefjon in [#5269](https://github.com/clockworklabs/SpacetimeDB/pull/5269)
- Simplify CLA gate workflow by @clockwork-labs-bot in [#5316](https://github.com/clockworklabs/SpacetimeDB/pull/5316)
- docs: clarify deterministic reducer randomness by @clockwork-labs-bot in [#5322](https://github.com/clockworklabs/SpacetimeDB/pull/5322)
**Full Changelog**: [v2.5.0...v2.6.0](https://github.com/clockworklabs/SpacetimeDB/compare/v2.5.0...v2.6.0)