this post was submitted on 05 Sep 2024
1 points (100.0% liked)
Rust
5989 readers
4 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm not sure what tokio (or axum) can do to avoid the trait bounds. Would it makes sense to provide a "share nothing" runtime implementation that can be injected at startup? I wonder how the intermediate layers (e.g. axum) would indicate that futures are usable by a more generic runtime which may or may not need
Send + 'static
.Without some way to write generic code for either runtime, the whole tokio ecosystem would end up bifurcated by this choice of runtime.
Isn't this
tokio::task::spawn_local
?