Skip to main content
Documentation

Manifest Reference

Bundle metadata, local dependencies, and backend configuration in sidex.toml.

A sidex.toml file identifies a bundle and configures its generators. Schema files live in a flat schemas directory next to the manifest.

Bundle Metadata

[bundle]
name = "models"
version = "0.1.0"

name identifies the bundle in imports and fully qualified type paths. version is metadata used by lifecycle checks when it is a semantic version.

Dependencies

[dependencies.identity]
path = "../identity"

Each dependency has a local path, resolved relative to the manifest’s directory. Use the bundle name as the dependency key and import its types with an absolute path such as ::identity::users::UserId.

Rust Backend

[backend.rust]
derive = ["Debug", "Clone"]
plugins = ["builder", "serde", "validate"]
opaque_lowering = "native"

[backend.rust.external]
identity = "::identity_models"

[backend.rust.types.table]
"::core::builtins::Map" = "::std::collections::BTreeMap"

[backend.rust.plugin.serde]
sidex_serde_path = "::sidex::serde"

[backend.rust.plugin.validate]
sidex_validate_path = "::sidex_validate"
KeyDefaultMeaning
derive[]Native derives on generated types
plugins[]Additional plugins: builder, serde, validate
external{}Bundle name to Rust module path
types.tableBuilt-in mappingsFully qualified Sidex path to Rust type
opaque_loweringnativeOpaque representation strategy
plugin.serde.sidex_serde_path::sidex::serdeSerialization runtime path
plugin.validate.sidex_validate_path::sidex_validateValidation runtime path

The types plugin is automatically enabled. User mappings take precedence over built-in defaults.

TypeScript Backend

[backend.ts]
plugins = ["validate"]
opaque_lowering = "native"

[backend.ts.external]
identity = "@example/identity-models"

[backend.ts.types.table]
"::core::builtins::i64" = "string"
KeyDefaultMeaning
plugins[]Additional plugins; currently validate
external{}Bundle name to module import
types.tableBuilt-in mappingsFully qualified Sidex path to type expression
opaque_loweringnativeSame JSON-based lowering for both current modes

The types plugin is automatically enabled. If you supply a types.table, include all mappings your model needs: the TypeScript configuration deserializes that table as supplied instead of merging it with the default table.

Python Backend

[backend.py]
opaque_lowering = "native"

[backend.py.external]
identity = "identity_models"

[backend.py.types.table]
"::core::builtins::string" = "str"
"::core::builtins::bool" = "bool"
KeyDefaultMeaning
external{}Bundle name to importable Python module
types.tableBuilt-in mappingsFully qualified Sidex path to Python type expression
opaque_loweringnativeOpaque representation strategy

When providing types.table, supply the mappings needed by the model. A supplied Python table also replaces the default table. Python generation has no configurable generator plugin list.

Opaque Lowering

An opaque type can have a target-specific native mapping and a JSON shape. The opaque_lowering setting chooses between them:

Backendnativejson
RustUse #[rust(type = "...")]; a native mapping is requiredIgnore the native mapping and lower from the JSON shape
PythonUse #[py(typ = "...")] when provided; otherwise use JSON shapeIgnore the native mapping and use JSON shape
TypeScriptUse JSON shapeCurrently the same as native

JSON lowering is useful for raw-value conformance tests. When no JSON shape is given, the fallback is serde_json::Value in Rust, pydantic.JsonValue in Python, and unknown in TypeScript.

IR and JSON Schema

The IR backend has no manifest configuration. The current JSON Schema CLI generator uses its built-in configuration and does not consume a manifest id_prefix setting. Use json attributes to configure supported wire representations.

Command Overrides

sidex generate py out --config-override opaque_lowering=json

Overrides change configuration for a single command. See the CLI reference for value parsing and key escaping.