Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ jobs:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo check --locked --manifest-path quinn/Cargo.toml --all-targets --no-default-features
- run: cargo check --locked --manifest-path quinn/Cargo.toml --all-targets --no-default-features --features runtime-tokio
- run: cargo clippy --locked --all-targets -- -D warnings
- uses: dtolnay/rust-toolchain@stable
with:
Expand Down
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 @@ -13,6 +13,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 runtime feature such as runtime-tokio, runtime-smol or custom-runtime");

/// 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