spinframework / spinframework/spin
Reorganize Spin runtime config code
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 6.5k
- Forks
- 310
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 24
Description
@rylev (who has done the most with this code previously): I can't recall why we didn't do this before; I may very well be arguing against my past self on this one.
I think we should consolidate all the runtime config TOML deserialization code (e.g. all the crates/factor-*/runtime_config/spin.rses) into the spin-runtime-config crate.
Working on #3150 reminded me of all the complexity in keeping the TOML code with the factor code and based on a quick search through Github whatever flexibility we (I?) were trying to preserve doesn't seem to have been necessary. That said, if we wanted to preserve the ability to use snippets of runtime config TOML from individual factors we could still keep things organized in modules by factor within that crate with feature flags to disable unwanted dependencies.
We might also consider squashing spin-runtime-config into spin-runtime-factors - the dependency graph doesn't show any reason for them to be separate - but that could be considered separately.
Contributor guide
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 by comparing the runtime config TOML deserialization code in the crates/factor-*/runtime_config/spin.rs files with the spin-runtime-config crate. Trace the dependency graph and determine whether factor-specific modules or feature flags are needed. Done means the deserialization code has a clear home and the decision about combining spin-runtime-config with spin-runtime-factors is resolved.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100