chore(config)!: migrate config file format from YAML to TOML#37
Merged
Conversation
BREAKING CHANGE: The configuration file format moves from YAML to TOML. Why - serde_yaml ships as 0.9.34+deprecated and the upstream repo is archived. Every successor fork (serde_yml, serde-yaml-ng, serde_norway) has had no release in 1.5+ years. - The toml crate is actively maintained by the Cargo team (releases in the past month) and is the idiomatic Rust config format. - LLMSim's config is a flat, typed, commented dict — exactly TOML's sweet spot. We used no YAML-specific features (anchors, merges, multi-doc, etc.), so the migration is mechanical. Changes - Replace `serde_yaml = "0.9"` with `toml = "1.1"` in Cargo.toml. - Rename `Config::from_yaml` to `Config::from_toml` and parse with `toml::from_str`. `Config::from_file` and the `--config` CLI flag are unchanged (only the file contents differ). - Convert the two bundled sample configs: - benchmarks/config/benchmark.yaml -> benchmark.toml - benchmarks/config/chaos.yaml -> chaos.toml and point `benchmarks/run-benchmark.sh` at the new paths. - Update inline test fixtures in `src/cli/config.rs` and `tests/integration_test.rs` to TOML. - Update README, AGENTS-adjacent docs, the architecture spec, the load-test skill, and the CLI help text to reference `config.toml`. - Add a CHANGELOG entry with a migration guide. Migration for existing users - Replace `section:` with `[section]` - Replace `key: value` with `key = value` - Quote strings and convert YAML lists to TOML arrays - See benchmarks/config/*.toml for a working before/after example
This was referenced May 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Breaking change: migrate the config file format from YAML to TOML and drop
serde_yaml.serde_yaml = "0.9"withtoml = "1.1"inCargo.toml.Config::from_yaml→Config::from_toml; parser switches totoml::from_str.Config::from_fileand the--configCLI flag are unchanged — only the file contents differ.benchmarks/config/benchmark.yaml,chaos.yaml) to.toml.benchmarks/run-benchmark.sh.Why
serde_yamlis published as0.9.34+deprecatedand the upstreamdtolnay/serde-yamlrepo is archived. Every successor fork is stale (latest releases as of today, 2026-05-17):serde_yaml(current)serde_ymlserde-yaml-ngserde_norwaytomlLLMSim's config is a flat, typed, commented dict — exactly TOML's sweet spot. We use zero YAML-specific features (anchors, merges, multi-doc, …), so the migration is mechanical. TOML is also the idiomatic Rust ecosystem config format.
How
Config::from_toml); everything else is fixture/doc conversion.--config benchmarks/config/benchmark.toml --port 8888:/health,/openai/v1/chat/completions,/openai/v1/modelsall respond correctly with the TOML-configuredlatency=fast,target_tokens=100.Migration for existing users
Rules:
section:→[section],key: value→key = value, quote strings, YAML lists → TOML arrays. Seebenchmarks/config/*.tomlfor full working examples.Risk
config.yaml. Mitigations:0.2.x(pre-1.0), so breaking changes are within semver allowance.--configflag name is unchanged — only the file format moves.Checklist
cargo fmt --checkcargo clippy --all-targets -- -D warnings(clean on rustc 1.95)cargo test(166 passed)--config benchmarks/config/benchmark.tomlserde_yamlreferences remain outside CHANGELOG explanation