ralexstokes / mev-rs

a gateway to a network of block builders
Other
413 stars 76 forks source link

Drop use of `async_trait` in `mev-rs` crate? #218

Closed ralexstokes closed 3 months ago

ralexstokes commented 4 months ago

There are some traits in mev-rs that have async methods, and the way to implement this until recently has been with the use of the async_trait crate.

As of Rust 1.75, there is preliminary support for using async methods in a trait and I wonder if there is enough native support to drop async_trait.

sarmatdev commented 4 months ago

async_trait is required by axum, we can't drop it now

Screenshot 2024-05-18 at 18 44 05
ralexstokes commented 3 months ago

thanks for looking into this!

it doesn't seem to be necessarily required by axum but async-trait gives additional trait bounds that do satisfy axum::Handler -- if you look at the blog post above, they talk about this

I think for now, we just table this