Skip to content

feat(rocket): launch SesameRocket on a caller-supplied Listener - #78

Open
jadidbourbaki wants to merge 1 commit into
brownsys:tahini-devfrom
jadidbourbaki:feat/sesame-rocket-launch-with-listener
Open

feat(rocket): launch SesameRocket on a caller-supplied Listener#78
jadidbourbaki wants to merge 1 commit into
brownsys:tahini-devfrom
jadidbourbaki:feat/sesame-rocket-launch-with-listener

Conversation

@jadidbourbaki

Copy link
Copy Markdown

SesameRocket::launch can 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 adds launch_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.

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.
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