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

feat(melpo+config): Initial "platform configuration" support, starting with Melpo #202

Merged
merged 14 commits into from
Aug 2, 2023

Conversation

jamesmunns
Copy link
Contributor

@jamesmunns jamesmunns commented Jul 30, 2023

This PR is the initial work towards implementing #199.

This introduces a config crate, which provides tools for platforms to have compile time defined configuration as a toml file.

This PR only implements these changes for melpomene, as adding support to hardware platforms may require more invasive crate re-orgs.

Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor suggestions, LMKWYT

source/config/src/lib.rs Outdated Show resolved Hide resolved
source/kernel/src/lib.rs Show resolved Hide resolved
source/kernel/src/serial_trace.rs Outdated Show resolved Hide resolved
@jamesmunns jamesmunns marked this pull request as ready for review August 2, 2023 01:16
@jamesmunns jamesmunns changed the title WIP: Implement basic config feat(melpo+config): Initial "platform configuration" support, starting with Melpo Aug 2, 2023
@jamesmunns jamesmunns requested a review from hawkw August 2, 2023 01:18
Copy link
Contributor

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall, this looks good!

one question is that it seems like there isn't currently a way to declare defaults when the config is declared, so the config file has to specify everything. is this desirable, or should we allow leaving a field blank to let it be defaulted?

platforms/melpomene/melpo-config/src/lib.rs Outdated Show resolved Hide resolved
platforms/melpomene/melpo-config/src/lib.rs Outdated Show resolved Hide resolved
platforms/melpomene/melpo.toml Outdated Show resolved Hide resolved
source/config/Cargo.toml Outdated Show resolved Hide resolved
source/config/Cargo.toml Show resolved Hide resolved
source/config/src/lib.rs Outdated Show resolved Hide resolved
source/config/src/lib.rs Outdated Show resolved Hide resolved
source/kernel/src/serial_trace.rs Show resolved Hide resolved
source/kernel/src/forth/mod.rs Outdated Show resolved Hide resolved
source/kernel/src/forth/mod.rs Outdated Show resolved Hide resolved
@jamesmunns jamesmunns merged commit e1cce16 into main Aug 2, 2023
6 checks passed
@jamesmunns jamesmunns deleted the james/impl-config branch August 2, 2023 20:17
@jamesmunns jamesmunns added the platform: melpomene Specific to the Melpomene simulator platform label Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: melpomene Specific to the Melpomene simulator platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants