Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion quinn/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ rustls-ring = ["dep:rustls", "ring", "proto/rustls-ring", "proto/ring"]
ring = ["proto/ring"]
runtime-tokio = ["tokio/time", "tokio/rt", "tokio/net"]
runtime-smol = ["dep:async-io", "dep:smol"]

# Allow users to declare a custom runtimne
custom-runtime = []
# Configure `tracing` to log events via `log` if no `tracing` subscriber exists.
tracing-log = ["tracing/log", "proto/tracing-log", "udp/tracing-log"]
# Enable rustls logging
Expand Down
3 changes: 3 additions & 0 deletions quinn/src/runtime/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ use udp::{RecvMeta, Transmit};

use crate::Instant;

#[cfg(not(any(feature = "runtime-tokio", feature = "runtime-smol", feature = "custom-runtime")))]
compile_error!("no async runtime found. Please enable a runtimse such as runtime-tokio, runtime-smol or custom-runtime");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "runtimse". Let's also word this as "a runtime feature" to provide a clearer breadcrumb to users who might not know what we're talking about.

Also please be consistent about capitalization and punctuation: if the text contains multiple sentences, then the first letter should be capitalized and there should be a trailing period.


/// Abstracts I/O and timer operations for runtime independence
pub trait Runtime: Send + Sync + Debug + 'static {
/// Construct a timer that will expire at `i`
Expand Down
Loading