Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configuration reference

The project manifest is panproto.toml in the project root. load_config returns Ok(None) when the file is absent and rejects malformed TOML as ProjectError::InvalidManifest.

Manifest shape

[workspace]
name = "my-project"
exclude = ["target", "build", "**/*.log"]

[[package]]
name = "user-api"
path = "schemas/user"
protocol = "json-schema"

[[package]]
name = "user-events"
path = "schemas/events"

[workspace]

FieldRust typeRequiredDefaultMeaning
nameStringyesnoneWorkspace name.
excludeVec<String>noemptyGlob patterns compiled relative to the manifest directory. Invalid patterns return ProjectError::InvalidPattern.

[[package]]

The top-level package array may be omitted and then defaults to empty.

FieldRust typeRequiredDefaultMeaning
nameStringyesnonePackage label. The loader does not enforce uniqueness.
pathPathBufyesnonePackage root relative to the manifest directory.
protocolOption<String>noNoneParser override for files below path. Without an override, detection uses the file path and parser registry.

If an overridden parser rejects a file, project assembly falls back to raw_file. It does not retry ordinary language detection. Package paths supply protocol-prefix overrides, but do not restrict the directory walk to the declared packages.

Generated defaults

schema init [PATH] always initializes .panproto/. When package scanning finds at least one recognized package, it also writes panproto.toml with detected package entries and these exclusions:

exclude = ["target", "node_modules", "__pycache__", "build", "dist", ".git"]

When scanning finds no package markers, schema init does not create a manifest. The package scanner recognizes Cargo, npm, Go, Python, Gradle, Elixir, and CMake project markers. Programmatic callers can use generate_config and serialize_config.

Source

The manifest structs and defaults live in crates/panproto-project/src/config.rs. Project assembly applies them in crates/panproto-project/src/lib.rs.

See also