michaelmelanson / michaelmelanson/panda-os
Service manager step 5: TOML parsing and service config
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Add TOML config parsing to init for reading service definitions from /config/services/{name}/config.toml. Each config specifies the service binary, dependencies, restart policy, and optional protocol.
This is step 5 of the service manager implementation (#26).
Desired behaviour
- Add the
tomlcrate (v0.9,no_stdcompatible) toinit - Parse
ServiceConfigfrom TOML files at/config/services/{name}/config.toml - Config fields:
binary: path to the service executableargs: optional command-line argumentsdependencies: list of service names this service depends onrestart: restart policy (always,on-failure,never)protocol: optional protocol name for protocol-based service discoverystop_timeout: grace period before SIGKILL after SIGTERM (default: 5s)
Example config
[service]
binary = "/initrd/terminal"
dependencies = ["keyboard"]
restart = "always"
protocol = "console"
stop_timeout = 5
Key files
userspace/init/Cargo.toml— addtomldependencyuserspace/init/src/—ServiceConfigstruct and parser- Config files in
rootfs/config/services/or embedded in initrd
Testing
- Unit tests for config parsing (valid configs, missing fields, invalid values)
- Test that all example configs parse correctly
- Test error reporting for malformed TOML
Documentation
- Document the config format with all supported fields
- Provide example configs for each built-in service
- Document the config search path and loading order
Part of #26
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with userspace/init/Cargo.toml and inspect userspace/init/src/ for the existing ServiceConfig or service-manager entry points. Review the config files in rootfs/config/services/ and add unit coverage for valid, missing-field, invalid-value, and malformed TOML cases. Done means the documented fields and search path are supported and all example configs parse successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100