Files
SpacetimeDB/crates/schema/Cargo.toml
Mazdak Farrokhzad d6bc325244 Define TableName and ReducerName backed by EcoString (#4137)
# Description of Changes

The first commit defines a type `TableName` that is used in e.g.,
`TxData` and where determined profitable and necessary to do this
change.
`TableName` is backed by
[`ecow::EcoString`](https://docs.rs/ecow/0.2.6/ecow/string/struct.EcoString.html)
which affords O(1) clones and 15 bytes of inline storage and
`mem::size_of::<EcoString>() == 16`.

The second commit does the same for `ReducerName`. This is also used in
reducer execution.

Together, these commits increase TPS by around 5-7k TPS.

# API and ABI breaking changes

None

# Expected complexity level and risk

1

# Testing

Covered by existing tests.
2026-01-27 23:20:30 +00:00

47 lines
1.2 KiB
TOML

[package]
name = "spacetimedb-schema"
version.workspace = true
edition.workspace = true
license-file = "LICENSE"
description = "Schema library for SpacetimeDB"
rust-version.workspace = true
[features]
test = []
[dependencies]
spacetimedb-lib = { workspace = true, features = ["enum-map"] }
spacetimedb-primitives = { workspace = true, features = ["memory-usage"] }
spacetimedb-sats = { workspace = true, features = ["memory-usage"] }
spacetimedb-data-structures.workspace = true
spacetimedb-memory-usage.workspace = true
spacetimedb-sql-parser.workspace = true
anyhow.workspace = true
derive_more.workspace = true
ecow.workspace = true
indexmap.workspace = true
itertools.workspace = true
lazy_static.workspace = true
thiserror.workspace = true
unicode-ident.workspace = true
unicode-normalization.workspace = true
petgraph.workspace = true
serde_json.workspace = true
smallvec.workspace = true
enum-as-inner.workspace = true
enum-map.workspace = true
insta.workspace = true
termcolor.workspace = true
[dev-dependencies]
spacetimedb-lib = { path = "../lib", features = ["test"] }
# these are circular dependencies, but only in tests, so it's fine
spacetimedb-testing = { path = "../testing" }
proptest.workspace = true
serial_test.workspace = true
[lints]
workspace = true