Rewrite the net standard library with smol ecosystem of crates#310
Merged
filiptibell merged 47 commits intomainfrom Apr 29, 2025
Merged
Rewrite the net standard library with smol ecosystem of crates#310filiptibell merged 47 commits intomainfrom
net standard library with smol ecosystem of crates#310filiptibell merged 47 commits intomainfrom
Conversation
…vert to Full<Bytes>
…d response methods
…upgrade + remove tracing in net
filiptibell
commented
Apr 29, 2025
Collaborator
Author
filiptibell
left a comment
There was a problem hiding this comment.
Will leave migrating the main lune crate to async-* stuff for a later PR or commit. This one is big enough as is and is feature complete now with tests fixed & expanded.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
netstandard library in Lune still usestokioand related crates for its client + server + websockets implementation. This has lead to various bugs that are difficult to track down, and the global state in tokio tends to conflict with other parts of the async ecosystem that doesn't use tokio.This PR migrates (really, rewrites) the net library to instead use
async-*crates, including manual integrations withrustlsandwebpkifor better control and future server-side TLS support. It still useshyperfor HTTP standards & request/response handling, and implements a few simple wrapper structs to integrate the non-tokio i/o with it.The server now also supports automatic decompression of request bodies just like the client does for requests, and has generally better performance with less allocations.