Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime Config Independent of Serialization #2685

Merged
merged 13 commits into from
Jul 26, 2024
Merged

Runtime Config Independent of Serialization #2685

merged 13 commits into from
Jul 26, 2024

Conversation

rylev
Copy link
Collaborator

@rylev rylev commented Jul 26, 2024

This change makes runtime config completely independent of how (or even if) it is serialized. The advantage of this is that we are no longer imposing toml of runtimes while still providing convenient handling of toml for runtimes that want to handle runtime config with toml.

RuntimeFactors gains an associated type RuntimeConfig which is passed directly to RuntimeFactors::configure_app. The derive macro ensures that this RuntimeConfig type implements FactorRuntimeConfigSource<F> where F: Factor for every factor in the RuntimeFactors collection. This works out that the runtime embedder then can implement FactorRuntimeConfigSource<F> for each of the factors they use.

I recommend checking out the tests and the smoke test for how this works in practice.

@rylev rylev requested a review from lann July 26, 2024 15:55
Signed-off-by: Ryan Levick <[email protected]>
@lann lann merged commit 53bfa6a into factors Jul 26, 2024
2 checks passed
@lann lann deleted the code-crimes branch July 26, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants