Conversation
pmikh
left a comment
There was a problem hiding this comment.
Really nice use of conditional compilation here — super clean way to handle platform-specific logic without cluttering the main code.
Might be worth breaking some of the longer sections (like transport setup or server startup) into smaller helper functions — would make the flow in main() a bit easier to follow.
Overall, very good job!
mhnap
left a comment
There was a problem hiding this comment.
Here are a couple of comments:
- I see that you have this on your TODO list, but please add more unit and integration tests.
- Run
cargo fmtandcargo clippy. - Add simple CI. There you can actually run tests, check whether your code compiles for all platforms and run fmt and clippy checks.
Actually, nothing more to say, good job!
| @@ -0,0 +1,52 @@ | |||
| # Basic Example | |||
| pub vsock_port: u32, | ||
| } | ||
|
|
||
| impl Default for TransportConfig { |
There was a problem hiding this comment.
nit: You can use serde_default::DefaultFromSerde to definetly have same the same defaults.
| } | ||
|
|
||
| fn default_true() -> bool { | ||
| true |
There was a problem hiding this comment.
nit: And also serde_inline_default if you want to remove clutter a bit.
|
|
||
| impl ProcessManager { | ||
| pub fn new() -> Self { | ||
| let (event_tx, event_rx) = mpsc::unbounded_channel(); |
There was a problem hiding this comment.
I would say that an unbounded channel is an anti-pattern. It's better to tune the right capacity for a bounded channel.
No description provided.