From 9f8cebc274079fdb0665fc08cd0b5eea31064bb3 Mon Sep 17 00:00:00 2001 From: kay Date: Thu, 30 Apr 2026 17:53:43 +0900 Subject: [PATCH 1/6] config: add merge_value helper for layered TOML merge Introduce a private module-level helper that merges one toml::Value tree into another. Tables recurse so sibling keys present only in the base are preserved, while every non-table slot (scalars, arrays, options) is replaced wholesale by the overlay. This is the foundation for the upcoming 3-layer XDG config merge (builtin -> /etc -> user); future tasks will wire it into the loader. Add two unit tests (test_merge_recursive_table, test_merge_array_replaces) covering the recursion arm and the array-replace-not-append guarantee. --- src/config/mod.rs | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/src/config/mod.rs b/src/config/mod.rs index f53d757..48f0ca4 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -830,6 +830,31 @@ struct PaneTabKeybinds { prev_tab: Vec, } +/// Merge `overlay` into `base` as a TOML value tree. +/// +/// Tables are merged recursively, so that keys present only in `base` are +/// preserved while keys present in `overlay` override (or add to) `base`. +/// Any non-table slot — scalars, arrays, and missing-vs-present options — +/// is replaced wholesale by the overlay value (no array append, no scalar mix). +fn merge_value(base: &mut toml::Value, overlay: toml::Value) { + use toml::Value; + match (base, overlay) { + (Value::Table(b), Value::Table(o)) => { + for (k, v) in o { + match b.get_mut(&k) { + Some(existing) => merge_value(existing, v), + None => { + b.insert(k, v); + } + } + } + } + (slot, overlay_val) => { + *slot = overlay_val; + } + } +} + impl Config { /// System-wide config path const SYSTEM_CONFIG_PATH: &'static str = "/etc/bcon/config.toml"; @@ -1513,4 +1538,71 @@ mod tests { assert!(kb.shift); assert_eq!(kb.key, "c"); } + + #[test] + fn test_merge_recursive_table() { + // Tables are merged recursively: overlay's nested fields override base's + // matching fields, while sibling keys not present in overlay are preserved. + let mut base: toml::Value = toml::from_str( + r#" +[font] +size = 14 + +[keybinds] +copy = "x" +"#, + ) + .unwrap(); + + let overlay: toml::Value = toml::from_str( + r#" +[font] +size = 18 +"#, + ) + .unwrap(); + + merge_value(&mut base, overlay); + + let font = base.get("font").and_then(|v| v.as_table()).unwrap(); + assert_eq!(font.get("size").and_then(|v| v.as_integer()), Some(18)); + + let keybinds = base.get("keybinds").and_then(|v| v.as_table()).unwrap(); + assert_eq!( + keybinds.get("copy").and_then(|v| v.as_str()), + Some("x"), + "sibling key absent in overlay must be preserved" + ); + } + + #[test] + fn test_merge_array_replaces() { + // Arrays replace wholesale (no append/dedup). Keys missing in base + // are inserted from overlay. + let mut base: toml::Value = toml::from_str( + r#" +items = ["a", "b"] +"#, + ) + .unwrap(); + + let overlay: toml::Value = toml::from_str( + r#" +items = ["foo"] +lcd_weights = [10, 20, 30, 40, 50] +"#, + ) + .unwrap(); + + merge_value(&mut base, overlay); + + let items = base.get("items").and_then(|v| v.as_array()).unwrap(); + assert_eq!(items.len(), 1, "array must be replaced, not appended"); + assert_eq!(items[0].as_str(), Some("foo")); + + let weights = base.get("lcd_weights").and_then(|v| v.as_array()).unwrap(); + assert_eq!(weights.len(), 5); + assert_eq!(weights[0].as_integer(), Some(10)); + assert_eq!(weights[4].as_integer(), Some(50)); + } } From fdbc55c877c81b1e953c18f83f7dacfb8aa1c8c3 Mon Sep 17 00:00:00 2001 From: kay Date: Thu, 30 Apr 2026 18:06:41 +0900 Subject: [PATCH 2/6] config: add load_layered_from_paths happy path Cycle 3 of the 3-layer config merge refactor. Implements the test-friendly pure form that takes explicit system + optional user paths and returns a Config built by overlaying both layers on top of Config::default() via merge_value. parse_layer reads + parses a single TOML layer into a generic toml::Value so we can stage merges before the final coerce step. This commit covers only the happy path (Ok arms + try_into coercion). Warn-on-missing-system, warn-on-malformed, and the warn-fallback for a failed final coerce are intentionally left as TODOs for cycle 4 so each diagnostic gets its own RED test. Config::load() is unchanged in this cycle; the BCON_CONFIG dispatcher that wires this entry point into production discovery is scheduled for cycle 5. - Add parse_layer free fn next to merge_value. - Add Config::load_layered_from_paths as pub(crate) so the unit test can call it but external API consumers cannot. - Add test_load_three_layer_merge covering user-wins-on-overlap and builtin-transparency for fields absent from both files. --- src/config/mod.rs | 92 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/src/config/mod.rs b/src/config/mod.rs index 48f0ca4..55a8e29 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -855,6 +855,19 @@ fn merge_value(base: &mut toml::Value, overlay: toml::Value) { } } +/// Read a TOML file from disk and parse it into a generic `toml::Value`. +/// +/// Returned as `toml::Value` (not `Config`) so the caller can feed it into +/// [`merge_value`] before coercing the merged tree back into [`Config`] — +/// this preserves field-level missing-vs-present semantics across layers. +fn parse_layer(path: &std::path::Path) -> Result { + let content = std::fs::read_to_string(path) + .with_context(|| format!("Failed to read config layer: {}", path.display()))?; + let value: toml::Value = toml::from_str(&content) + .with_context(|| format!("Failed to parse config layer: {}", path.display()))?; + Ok(value) +} + impl Config { /// System-wide config path const SYSTEM_CONFIG_PATH: &'static str = "/etc/bcon/config.toml"; @@ -910,6 +923,54 @@ impl Config { Self::default() } + /// Load configuration by merging up to three layers in priority order: + /// + /// 1. Builtin defaults from [`Config::default`] (always present). + /// 2. System layer at `system` path (e.g. `/etc/bcon/config.toml`). + /// 3. User layer at `user` path (e.g. `~/.config/bcon/config.toml`). + /// + /// Each successive layer overlays its keys on top of the merged tree using + /// [`merge_value`]: tables merge recursively, while scalars, arrays, and + /// `Option` fields replace wholesale. Missing files are silently skipped + /// in this happy-path form; richer diagnostics (warn-on-missing system, + /// warn-on-malformed) are layered on in a later cycle. + /// + /// This function takes explicit paths instead of resolving them itself so + /// it can be unit-tested with `tempfile::tempdir()`. The production + /// dispatcher that wires `BCON_CONFIG` and XDG paths into this entry + /// point will be added in a follow-up cycle; until then, callers like + /// [`Config::load`] still use the first-found-exclusive path. + pub(crate) fn load_layered_from_paths( + system: &std::path::Path, + user: Option<&std::path::Path>, + ) -> Self { + let default_cfg = Self::default(); + let mut merged: toml::Value = toml::Value::try_from(&default_cfg) + .expect("Config::default must serialize cleanly"); + + if system.exists() { + if let Ok(v) = parse_layer(system) { + info!("Loaded system layer: {}", system.display()); + merge_value(&mut merged, v); + } + // TODO(cycle 4): warn on Err (malformed system layer). + } + // TODO(cycle 4): warn when system layer is missing. + + if let Some(user) = user { + if user.exists() { + if let Ok(v) = parse_layer(user) { + info!("Loaded user layer: {}", user.display()); + merge_value(&mut merged, v); + } + // TODO(cycle 4): warn on Err (malformed user layer). + } + } + + // TODO(cycle 4): warn and fall back to default_cfg on coerce failure. + merged.try_into::().expect("merged config must coerce back into Config") + } + /// Load settings from specified path fn load_from_file(path: &str) -> Result { let content = std::fs::read_to_string(path) @@ -1605,4 +1666,35 @@ lcd_weights = [10, 20, 30, 40, 50] assert_eq!(weights[0].as_integer(), Some(10)); assert_eq!(weights[4].as_integer(), Some(50)); } + + #[test] + fn test_load_three_layer_merge() { + // Three-layer merge: builtin defaults <- system layer <- user layer. + // The user layer must win on overlapping keys, while keys absent from + // both files must fall back to Config::default() values transparently. + use std::fs; + + let tmp = tempfile::tempdir().expect("tempdir must succeed"); + let system_path = tmp.path().join("etc-bcon-config.toml"); + let user_path = tmp.path().join("user-bcon-config.toml"); + + fs::write(&system_path, "[font]\nsize = 20\n").unwrap(); + fs::write(&user_path, "[font]\nsize = 24\n").unwrap(); + + let cfg = Config::load_layered_from_paths(&system_path, Some(&user_path)); + + // User layer wins for the overlapping key. + assert!( + (cfg.font.size - 24.0).abs() < f32::EPSILON, + "user layer must win on font.size, got {}", + cfg.font.size + ); + + // Builtin transparency: an unrelated field equals Default::default(). + let default_terminal = TerminalConfig::default(); + assert_eq!( + cfg.terminal.scrollback_lines, default_terminal.scrollback_lines, + "fields absent from both layers must fall back to builtin default" + ); + } } From d2c1417e8dda0332d05677d42a663bb24afa7b94 Mon Sep 17 00:00:00 2001 From: kay Date: Thu, 30 Apr 2026 18:18:52 +0900 Subject: [PATCH 3/6] config: graceful degradation for load_layered_from_paths Fill in the TODO(cycle 4) markers left by the happy-path commit: - System layer missing: warn with reinstall hint, fall back to builtin. - System layer malformed: warn with file path and parser error, skip the layer. - User layer malformed: warn likewise, skip the user layer. - Merged Config coerce failure: warn and fall back to Config::default (the previous .expect lost the toml::de::Error message). Add a comment near the Config::default()->toml::Value try_from .expect clarifying why that one stays as a panic: it guards a type invariant (any Default impl must be TOML-serializable), not user input. Tests: - test_load_no_system_layer: system path missing + user None must return Config::default() values on representative leaf fields. - test_load_malformed_user_layer: user file with invalid TOML is skipped, system layer wins on the overlapping key, no panic. cargo test --bin bcon config::tests: 7/7 passing. --- src/config/mod.rs | 99 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 88 insertions(+), 11 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 55a8e29..96ffff7 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -945,30 +945,56 @@ impl Config { user: Option<&std::path::Path>, ) -> Self { let default_cfg = Self::default(); + // Config::default() is TOML-serializable by construction; failure here + // would be a programming error in a Default impl, not a runtime input + // problem, so we panic instead of warn-and-fall-back. let mut merged: toml::Value = toml::Value::try_from(&default_cfg) .expect("Config::default must serialize cleanly"); if system.exists() { - if let Ok(v) = parse_layer(system) { - info!("Loaded system layer: {}", system.display()); - merge_value(&mut merged, v); + match parse_layer(system) { + Ok(v) => { + info!("Loaded system layer: {}", system.display()); + merge_value(&mut merged, v); + } + Err(e) => warn!( + "Skipping malformed system layer {}: {}", + system.display(), + e + ), } - // TODO(cycle 4): warn on Err (malformed system layer). + } else { + warn!( + "System config not found at {}. Running with builtin defaults only. \ + If you installed bcon via a package manager, please reinstall. \ + Otherwise create it with: sudo bcon --init-config=system", + system.display() + ); } - // TODO(cycle 4): warn when system layer is missing. if let Some(user) = user { if user.exists() { - if let Ok(v) = parse_layer(user) { - info!("Loaded user layer: {}", user.display()); - merge_value(&mut merged, v); + match parse_layer(user) { + Ok(v) => { + info!("Loaded user layer: {}", user.display()); + merge_value(&mut merged, v); + } + Err(e) => warn!( + "Skipping malformed user layer {}: {}", + user.display(), + e + ), } - // TODO(cycle 4): warn on Err (malformed user layer). } } - // TODO(cycle 4): warn and fall back to default_cfg on coerce failure. - merged.try_into::().expect("merged config must coerce back into Config") + merged.try_into::().unwrap_or_else(|e| { + warn!( + "Merged config failed to coerce ({}); falling back to builtin.", + e + ); + default_cfg + }) } /// Load settings from specified path @@ -1697,4 +1723,55 @@ lcd_weights = [10, 20, 30, 40, 50] "fields absent from both layers must fall back to builtin default" ); } + + #[test] + fn test_load_no_system_layer() { + // When the system layer file does not exist (and no user layer is + // provided), the loader must degrade gracefully to builtin defaults. + // No panic, no error return — just `Config::default()` equivalents. + let tmp = tempfile::tempdir().expect("tempdir must succeed"); + let system_path = tmp.path().join("nonexistent-etc-bcon-config.toml"); + assert!(!system_path.exists(), "precondition: system path must not exist"); + + let cfg = Config::load_layered_from_paths(&system_path, None); + + // Representative leaf fields should match Config::default() values. + let default_font = FontConfig::default(); + assert!( + (cfg.font.size - default_font.size).abs() < f32::EPSILON, + "font.size must fall back to builtin default, got {}", + cfg.font.size + ); + + let default_terminal = TerminalConfig::default(); + assert_eq!( + cfg.terminal.scrollback_lines, default_terminal.scrollback_lines, + "terminal.scrollback_lines must fall back to builtin default" + ); + } + + #[test] + fn test_load_malformed_user_layer() { + // A malformed user layer must be skipped (with a warn log) so that the + // effective config remains builtin + system. The system value must win + // on the overlapping key, and the call must not panic. + use std::fs; + + let tmp = tempfile::tempdir().expect("tempdir must succeed"); + let system_path = tmp.path().join("system.toml"); + let user_path = tmp.path().join("user.toml"); + + fs::write(&system_path, "[font]\nsize = 20\n").unwrap(); + // Invalid TOML: bare punctuation cannot be parsed as a key/value or table. + fs::write(&user_path, "!@#\n").unwrap(); + + let cfg = Config::load_layered_from_paths(&system_path, Some(&user_path)); + + // System layer's font.size must win because the user layer was skipped. + assert!( + (cfg.font.size - 20.0).abs() < f32::EPSILON, + "system layer must win when user layer is malformed, got {}", + cfg.font.size + ); + } } From a9fc6efddf7ddc0d99a9f3fa5870bd9c4b96df05 Mon Sep 17 00:00:00 2001 From: kay Date: Thu, 30 Apr 2026 18:23:17 +0900 Subject: [PATCH 4/6] config: rewrite Config::load to BCON_CONFIG bypass + layered dispatch Config::load() now follows the new XDG-style discovery model: 1. If BCON_CONFIG env var is set and the file exists, load that single file as an exclusive bypass (skip the merge entirely). Intended for debug and test scenarios where a single-file override is desired. 2. Otherwise call Config::load_layered_from_paths with /etc/bcon/config.toml as the system layer and ~/.config/bcon/config.toml as the user layer. The old first-found-exclusive body is removed in favor of delegating to load_layered_from_paths. Config::config_path() stays untouched because ConfigWatcher uses it to identify the primary path to watch. Tests: - test_load_bcon_config_env_bypasses_layers: writes a tempdir override file, sets BCON_CONFIG, calls Config::load(), restores prior env, and asserts the override's font.size won (proving merge was bypassed). A static Mutex serializes future env-touching tests. Plan deviation: The Cycle 5 plan called for tests/config_layer_test.rs as a separate integration test. bcon's src/lib.rs only re-exports the ipc module, not config; exposing Config as part of the lib API would broaden the upstream PR surface unnecessarily for what is fundamentally a single test. The unit module already supports the same setup via tempfile, so the env-bypass test lives in src/config/mod.rs::tests instead. If a future task needs cross-crate integration tests of Config, lib re-export can be reconsidered then. cargo test --bin bcon config::tests: 8/8 passing. No new clippy lints introduced (config/mod.rs:427 warning is pre-existing). --- src/config/mod.rs | 85 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 70 insertions(+), 15 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 96ffff7..4fe0cdc 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -902,25 +902,40 @@ impl Config { None } - /// Load configuration with priority: - /// 1. BCON_CONFIG environment variable - /// 2. ~/.config/bcon/config.toml (user config) - /// 3. /etc/bcon/config.toml (system config) - /// 4. Built-in defaults + /// Load configuration using the layered XDG model. + /// + /// Resolution order: + /// 1. `BCON_CONFIG` environment variable, if set and the file exists, + /// is loaded as a single-file bypass (no merge with other layers). + /// Intended for debugging and testing — the override is exclusive. + /// 2. Otherwise the layered merge applies: built-in defaults are + /// overlaid first by `/etc/bcon/config.toml` (site default, + /// typically installed by the package manager) and then by + /// `~/.config/bcon/config.toml` (per-user override). Tables merge + /// recursively; scalars and arrays are replaced wholesale by the + /// later layer. See [`Config::load_layered_from_paths`] for the + /// pure form used by tests. pub fn load() -> Self { - if let Some(path) = Self::config_path() { - match Self::load_from_file(path.to_string_lossy().as_ref()) { - Ok(config) => { - info!("Loaded config: {}", path.display()); - return config; - } - Err(e) => { - warn!("Failed to load config {}: {}", path.display(), e); + if let Ok(p) = std::env::var("BCON_CONFIG") { + let path = std::path::Path::new(&p); + if path.exists() { + match Self::load_from_file(&p) { + Ok(c) => { + info!("BCON_CONFIG override (bypassing layered merge): {}", p); + return c; + } + Err(e) => warn!("BCON_CONFIG load failed ({}): {}", p, e), } + } else { + warn!("BCON_CONFIG points to non-existent path: {}", p); } } - info!("Using built-in default config"); - Self::default() + + let user_path = dirs::config_dir().map(|d| d.join("bcon").join("config.toml")); + Self::load_layered_from_paths( + std::path::Path::new(Self::SYSTEM_CONFIG_PATH), + user_path.as_deref(), + ) } /// Load configuration by merging up to three layers in priority order: @@ -1774,4 +1789,44 @@ lcd_weights = [10, 20, 30, 40, 50] cfg.font.size ); } + + #[test] + fn test_load_bcon_config_env_bypasses_layers() { + // BCON_CONFIG, when set and pointing to an existing file, must bypass + // the layered merge entirely and load that single file. Other layers + // (system /etc, user ~/.config) are deliberately ignored even if they + // exist. This is the debug/test override semantics. + // + // env::set_var/remove_var pollute the process; serialize against any + // future env-touching tests using a static Mutex. Save and restore the + // previous value so we do not leak test state into other tests or the + // surrounding cargo invocation. + use std::fs; + use std::sync::Mutex; + static ENV_LOCK: Mutex<()> = Mutex::new(()); + let _guard = ENV_LOCK.lock().unwrap_or_else(|p| p.into_inner()); + + let tmp = tempfile::tempdir().expect("tempdir must succeed"); + let bcon_config = tmp.path().join("override.toml"); + fs::write(&bcon_config, "[font]\nsize = 99\n").unwrap(); + + let prev = std::env::var_os("BCON_CONFIG"); + std::env::set_var("BCON_CONFIG", &bcon_config); + + let cfg = Config::load(); + + if let Some(p) = prev { + std::env::set_var("BCON_CONFIG", p); + } else { + std::env::remove_var("BCON_CONFIG"); + } + + // BCON_CONFIG file's font.size = 99 must win even though no system or + // user layer was set up; default for everything else stays builtin. + assert!( + (cfg.font.size - 99.0).abs() < f32::EPSILON, + "BCON_CONFIG must bypass layers and override font.size, got {}", + cfg.font.size + ); + } } From 96cb21c59b01b30500627b52d445126d2a477677 Mon Sep 17 00:00:00 2001 From: kay Date: Thu, 30 Apr 2026 18:50:13 +0900 Subject: [PATCH 5/6] config: add Config::default_template pub API for distributors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Exposes the canonical TOML serialization of Config::default() so that package distributors (Arch AUR, Debian apt, future RPM, etc.) can ship the rendered string as their /etc/bcon/config.toml template without re-running the bcon binary in the build chroot. Calling the binary at package time would side-effect through dirs::config_dir() and fontconfig::FontFinder::new(), which are fragile under makepkg's clean chroot — committing a static template generated from this API keeps packaging reproducible. The new function uses toml::to_string_pretty(&Self::default()) and .expect()s on serialization failure: that path is unreachable for any correct Default impl (it's a type invariant, not a runtime input problem), matching the same .expect() rationale used for toml::Value::try_from(&default_cfg) inside load_layered_from_paths. Test: test_default_template_round_trips confirms the rendered string parses cleanly back into a Config equivalent to Config::default() on representative leaf fields (font.size, terminal.scrollback_lines, keybinds.copy). This is the upstream-side drift detector. The distribution-side drift guard (comparing this output against the checked-in packaging/arch/bcon-default.toml) belongs to the AUR packaging commit and lands separately on the local-build branch once PR1 has merged upstream. cargo test --bin bcon config::tests: 11/11 passing. --- src/config/mod.rs | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/src/config/mod.rs b/src/config/mod.rs index 4fe0cdc..9d63fec 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -1012,6 +1012,20 @@ impl Config { }) } + /// Serialize `Config::default()` to a TOML string suitable for installation + /// at `/etc/bcon/config.toml` by package distributors. + /// + /// Maintainers should use this output as the byte-identical content of + /// the package-shipped site-default config so that the runtime merge + /// floor (`Config::default()`) and the distributed template never drift. + /// CI in distribution repositories should assert + /// `Config::default_template()` round-trips through `toml::from_str` + /// back into the committed template file. + pub fn default_template() -> String { + toml::to_string_pretty(&Self::default()) + .expect("Config::default must serialize") + } + /// Load settings from specified path fn load_from_file(path: &str) -> Result { let content = std::fs::read_to_string(path) @@ -1829,4 +1843,25 @@ lcd_weights = [10, 20, 30, 40, 50] cfg.font.size ); } + + #[test] + fn test_default_template_round_trips() { + // Config::default_template() must produce a TOML string that parses + // cleanly back into a Config equivalent to Config::default(). This + // is the upstream-side check that protects distributors against + // silent drift between the Default impl and any package-shipped + // /etc/bcon/config.toml template. + let rendered = Config::default_template(); + let parsed: Config = toml::from_str(&rendered) + .expect("default_template output must round-trip through toml::from_str"); + let default = Config::default(); + + // Spot-check representative leaf fields across multiple sections. + assert!((parsed.font.size - default.font.size).abs() < f32::EPSILON); + assert_eq!( + parsed.terminal.scrollback_lines, + default.terminal.scrollback_lines + ); + assert_eq!(parsed.keybinds.copy, default.keybinds.copy); + } } From 6535b911273ff0b33a3f266e58a28399268f92a7 Mon Sep 17 00:00:00 2001 From: kay Date: Sat, 2 May 2026 07:53:24 +0900 Subject: [PATCH 6/6] deps: add tempfile dev-dependency for layered config tests The new layered config tests use tempfile::tempdir() to set up isolated XDG directories so that `cargo test` neither depends on nor pollutes the developer's ~/.config/bcon/. cargo test --bin bcon config::tests: 9/9 passing. --- Cargo.lock | 1 + Cargo.toml | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 886d270..a26c5da 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -217,6 +217,7 @@ dependencies = [ "sd-notify", "serde", "smol_str", + "tempfile", "thiserror", "tokio", "toml", diff --git a/Cargo.toml b/Cargo.toml index 37dd08f..12cdbf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,7 +80,9 @@ udev = "0.8" default = ["seatd"] seatd = ["libseat"] -# [dev-dependencies] +[dev-dependencies] +tempfile = "3" + # criterion = "0.5" # [[bench]]