Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(iroh): Modularize protocol (#2454)
## Description Use a newly created macro crate https://github.com/n0-computer/nested-enum-utils to allow for from/to conversions for deeply nested enums. This allows us to split the protocol enum into multiple parts without changing anything about the basic concept of how things are handled. ## Breaking Changes Weirdly, I think there should be none since the protocol is private. ## Notes & open questions Obvious next steps would be - [x] define the subsystem specific messages in submodules - [x] publish the macro crate - [x] (maybe) split up the handling of the different subsystems - [x] (maybe) remove the subsystem prefixes from the messages Not so obvious next steps (maybe next PR) - Allow moving the subsystem protocols to different crates. This is difficult because you can not set the target when generating the conversions. ## Change checklist - [x] Self-review. - [x] Documentation updates if relevant. - [x] Tests if relevant. - [x] All breaking changes documented.
- Loading branch information