[codex] Switch configuration system to TOML#218
Draft
Bathtor wants to merge 5 commits intokompics:masterfrom
Draft
[codex] Switch configuration system to TOML#218Bathtor wants to merge 5 commits intokompics:masterfrom
Bathtor wants to merge 5 commits intokompics:masterfrom
Conversation
Bathtor
commented
Apr 13, 2026
Bathtor
commented
Apr 13, 2026
Contributor
Author
Bathtor
left a comment
There was a problem hiding this comment.
I think overall we stayed very close to HOCON API, which admittedly reduces breaking changes, but I think we there are places where we can and simply should do better and accept a bit more breakage at this point. It'll only be more painful later.
Bathtor
commented
Apr 13, 2026
Contributor
Author
Bathtor
left a comment
There was a problem hiding this comment.
Few more comments, then it's ready.
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.
Summary
ConfigandConfigValuetypesMotivation
Rust support for HOCON is not in a good state, while TOML is well-supported and already familiar to Rust users. Since Kompact is still pre-1.0, this change intentionally takes the breaking API clean-up now instead of carrying parser-specific design constraints forward.
API Changes
KompactSystem::config()andComponentContext::config()now return&ConfigConfigis now the public top-level document type;ConfigValuerepresents a single parsed valueconfig["a"]["b"]still works, but it is now a panicking convenience API, just like standard Rust indexingconfig.get("a")for a top-level key andconfig.select("a.b")for dotted paths; both return aConfigLookupthat keeps the full accessed path for better error messagesconfig.read(&ENTRY)andconfig.read_or_default(&ENTRY)instead ofgetandget_or_defaultas_duration()andas_bytes(), and TOML datetimes are preserved viaas_datetime()set_config_value(...)now injects directly into the overlay config instead of relying on parser-specific string snippetsConfig Semantics
"100 ms"and"128KiB"Files And Examples
app_settings.tomlcore/src/lib.rsis nowtest_settings.tomlValidation
cargo fmt --allcargo test --workspace --no-runcargo test --workspaceFixes #187