Skip to content

Commit

Permalink
Merge pull request #72 from jmagnuson/no-runtime-compile-error
Browse files Browse the repository at this point in the history
Add compile_error! if no runtime is set
  • Loading branch information
jmagnuson authored Sep 29, 2024
2 parents acaafc6 + 9b17424 commit fca14fe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ Add linemux to your `Cargo.toml` with:
linemux = "0.3"
```

### Feature flags

Note that building with `default-features: false` must also be coupled with activating a desired
runtime (currently just `tokio`, but eventually others will be supported).

- `tokio`: Use the tokio runtime (default).

## Example

```rust,no_run
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ pub use reader::{Line, MuxedLines};

#[cfg(doctest)]
doc_comment::doctest!("../README.md");

#[cfg(not(any(feature = "tokio")))]
compile_error!("At least one runtime feature must be enabled from: [\"tokio\"]");

0 comments on commit fca14fe

Please sign in to comment.