Skip to content

Conversation

@lionkor
Copy link
Contributor

@lionkor lionkor commented Jun 26, 2025

Adds a servercom module; used soon in voltchat as a demo.

@lionkor lionkor requested a review from Copilot June 26, 2025 23:13
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces a new library “servercom” to simplify constructing voltlane servers and updates the connserver module to adopt new async function signatures without async-trait.

  • Added MasterServer trait and ServerCore struct in servercom for handling client connections.
  • Updated Cargo.toml workspaces to include the new servercom crate.
  • Modified the MasterDuplex trait in connserver to use new async function signatures.

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
servercom/src/lib.rs Introduces new traits and a core server structure utilizing new async closure patterns.
servercom/Cargo.toml Defines the new servercom package and its dependencies.
connserver/src/master.rs Updates MasterDuplex trait to use impl Future return types instead of async_trait.
connserver/Cargo.toml Removes the dependency on async-trait in favor of new async function syntax.
Cargo.toml Updates workspace members to include servercom.
Comments suppressed due to low confidence (2)

servercom/src/lib.rs:10

  • It is unclear whether AsyncFnMut is a custom trait or imported from a dependency; consider adding documentation or an explicit import to clarify its origin and expected behavior.
        send_packet: impl AsyncFnMut(net::TaggedPacket) -> anyhow::Result<()>,

connserver/src/master.rs:11

  • Ensure that the future returned by implementations of send_packet satisfies the Send bound as required by the trait to maintain consistency with asynchronous usage across the codebase.
    fn send_packet(&mut self, packet: TaggedPacket) -> impl Future<Output = anyhow::Result<()>> + Send;

@lionkor lionkor merged commit 3619e45 into master Jun 26, 2025
1 check passed
@lionkor lionkor deleted the add-servercom branch June 26, 2025 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant