Open jonassmedegaard opened 1 year ago
Thanks for the report. It's somewhat moot right now since tokio
is currently the only supported runtime, but this error is due to the overall desire to support other runtimes like async-std
, and cargo's inability to declare that exactly one feature of a set is enabled at build time (likely https://github.com/rust-lang/cargo/issues/2980).
Looking at how sqlx
handles this, they expose various facades which panic on execution if no runtime is set (example). That may be a specific design decision, since it should be possible to fail at compile time via compile_error!
.
Building and testing with option
--no-default-features
fails like this: