Files
clockwork-labs-bot a89634b4a5 Add #[spacetimedb::settings] for module-level configuration (#4366)
## Summary

Adds a cross-language `#[spacetimedb::settings]` mechanism for declaring
module-level settings. The first supported setting is
`CASE_CONVERSION_POLICY`, which controls how identifiers are
case-converted.

### Rust

```rust
use spacetimedb::CaseConversionPolicy;

#[spacetimedb::settings]
const CASE_CONVERSION_POLICY: CaseConversionPolicy = CaseConversionPolicy::None;
```

- Proc macro validates const name against `KNOWN_SETTINGS`
- Generates `__preinit__` export for registration
- Duplicate settings produce a linker error (duplicate symbol)

### TypeScript

```ts
export const moduleSettings: ModuleSettings = {
  caseConversionPolicy: CaseConversionPolicy.None,
};
```

- `ModuleSettings` interface with typed fields
- `caseConversionPolicy` section pushed in `rawModuleDefV10()`


## Stacked on

- `shub/case-conversion` (base)
- PR #4364 (internal opt-out API)

This PR adds the proper user-facing API on top of the internal mechanism
in #4364.

Co-authored-by: clockwork-labs-bot <clockwork-labs-bot@users.noreply.github.com>
2026-02-20 15:26:40 +00:00
..
2025-08-12 18:20:58 +00:00

⚠️ Unstable Crate ⚠️

The interface of this crate is not stable and may change without notice.