60
submitted 11 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 1 points 11 months ago* (last edited 11 months ago)

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.

[-] [email protected] 1 points 11 months ago

Would it makes sense to provide a "share nothing" runtime implementation that can be injected at startup?

Isn't this tokio::task::spawn_local?

[-] [email protected] 1 points 11 months ago

Not exactly. I'm talking specifically about being able to call axum::serve with non-Send futures.

this post was submitted on 05 Sep 2024
60 points (100.0% liked)

Rust

7217 readers
74 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

[email protected]

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 2 years ago
MODERATORS