dibs_config/lib.rs
1//! Facet types for the dibs configuration schema.
2//!
3//! These types define the structure of `dibs.styx` config files and can be:
4//! - Deserialized from styx using facet-styx
5//! - Used to generate a styx schema via facet-styx's schema generation
6
7use facet::Facet;
8
9/// Configuration loaded from `dibs.styx`.
10#[derive(Debug, Clone, Default, Facet)]
11pub struct Config {
12 /// Database crate configuration.
13 #[facet(default)]
14 pub db: DbConfig,
15}
16
17/// Database crate configuration.
18#[derive(Debug, Clone, Facet, Default)]
19pub struct DbConfig {
20 /// Name of the crate containing schema definitions (e.g., "my-app-db").
21 #[facet(rename = "crate")]
22 pub crate_name: Option<String>,
23
24 /// Path to a pre-built binary (for faster iteration).
25 /// If not specified, we'll use `cargo run -p <crate_name>`.
26 pub binary: Option<String>,
27}