feat(rocket): launch SesameRocket on a caller-supplied Listener - #78
Open
jadidbourbaki wants to merge 1 commit into
Open
feat(rocket): launch SesameRocket on a caller-supplied Listener#78jadidbourbaki wants to merge 1 commit into
jadidbourbaki wants to merge 1 commit into
Conversation
SesameRocket::launch only reaches the transports Rocket ships with, so a Sesame application with its own TLS stack cannot serve at all. Add launch_with_listener, forwarding to the same method on the underlying Rocket. Depends on KinanBab/Rocket#1, which adds that method. Merging this before that lands will not compile.
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.
SesameRocket::launchcan only reach the transports Rocket ships with, TCP and rustls, so a Sesame application that brings its own TLS stack cannot serve through it at all. I hit this driving fizz-rs TLS in the Tahini benchmarks. My workaround was to vendor a patched copy of sesame_rocket carrying this one method, which cost me real time this week: because the copy does not receive upstream changes, your rendering optimization did not reach my application until I re-vendored the whole src tree by hand and reapplied the patch. A build script patch is not an option either, since Cargo reads a path dependency's source before any other crate's build script runs. This addslaunch_with_listener, an eleven-line forward to the method of the same name on the underlying Rocket. Note that it depends on KinanBab/Rocket#1, which adds that method to your Rocket fork, and it will not compile before that lands. With both merged I can delete the vendored copy and depend on sesame_rocket directly, so your future rendering work reaches me for free.