-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
*: Feature gate async runtime, allow opting between Tokio or smol (#27)
For every OS each `IfWatcher` is under the `tokio` or `smol` module.
- Loading branch information
Showing
9 changed files
with
251 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,35 @@ | ||
[package] | ||
name = "if-watch" | ||
version = "2.0.0" | ||
version = "3.0.0" | ||
authors = ["David Craven <[email protected]>", "Parity Technologies Limited <[email protected]>"] | ||
edition = "2021" | ||
keywords = ["asynchronous", "routing"] | ||
license = "MIT OR Apache-2.0" | ||
description = "crossplatform asynchronous network watcher" | ||
repository = "https://github.com/mxinden/if-watch" | ||
|
||
[lib] | ||
crate-type = ["cdylib", "lib"] | ||
|
||
[features] | ||
tokio = ["dep:tokio", "rtnetlink/tokio_socket"] | ||
smol = ["dep:smol", "rtnetlink/smol_socket"] | ||
|
||
[dependencies] | ||
fnv = "1.0.7" | ||
futures = "0.3.19" | ||
ipnet = "2.3.1" | ||
log = "0.4.14" | ||
|
||
[target.'cfg(target_os = "linux")'.dependencies] | ||
rtnetlink = { version = "0.10.0", default-features = false, features = ["smol_socket"] } | ||
rtnetlink = { version = "0.10.0", default-features = false } | ||
|
||
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] | ||
core-foundation = "0.9.2" | ||
if-addrs = "0.7.0" | ||
system-configuration = "0.5.0" | ||
tokio = { version = "1.21.2", features = ["rt"], optional = true } | ||
smol = { version = "1.2.5", optional = true } | ||
|
||
[target.'cfg(target_os = "windows")'.dependencies] | ||
if-addrs = "0.7.0" | ||
|
@@ -32,3 +41,10 @@ if-addrs = "0.7.0" | |
|
||
[dev-dependencies] | ||
env_logger = "0.9.0" | ||
smol = "1.2.5" | ||
tokio = { version = "1.21.2", features = ["rt", "macros"] } | ||
|
||
[[example]] | ||
name = "if_watch" | ||
required-features = ["smol"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.