[package] name = "riptun" version = "0.1.4" edition = "2018" description = "riptun is a cross platform library for creating, managing, and leveraging both sync and async TUN/TAP devices." license = "MIT" repository = "https://github.com/csaide/riptun" authors = ["Christian Saide"] exclude = [ ".github/*", "dist/*", ".dockerignore", ".devcontainer.json", "codecov.yaml", ] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] # Generic required dependencies. cfg-if = "1.0.0" nix = "0.23.0" thiserror = "1.0.28" # Async specific dependencies, see the features bellow to determine when they are included. async-io = { version = "1.0.1", optional = true } futures-util = { version = "0.3.17", optional = true } futures-io = { version = "0.3.17", optional = true } mio = { version = "0.7", optional = true, default-features = false, features = ["os-ext"] } tokio = { version = "1.12.0", optional = true, default-features = false, features = ["net"] } # Example only dependencies, these are never included in the final library builds. async-std = { version = "1.10.0", optional = true } smol = { version = "1.2.5", optional = true } [features] # Default feature set is to enable all async capabilities. default = ["mio-impl", "async-std-impl", "tokio-impl"] # Enable/disable individual async implementations. mio-impl = ["mio"] async-std-impl = ["async-io", "futures-util", "futures-io"] tokio-impl = ["tokio", "futures-util", "futures-io"] # Strictly for examples. async-std-example = ["async-std/attributes", "async-std/default", "async-std-impl", ] tokio-example = ["tokio/rt", "tokio/rt-multi-thread", "tokio/macros", "tokio-impl"] smol-example = ["smol", "async-std-impl"] [[example]] name = "sync" path = "examples/sync.rs" required-features = [] [[example]] name = "mio" path = "examples/mio.rs" required-features = ["mio-impl"] [[example]] name = "smol" path = "examples/smol.rs" required-features = ["smol-example"] [[example]] name = "std" path = "examples/std.rs" required-features = ["async-std-example"] [[example]] name = "tokio" path = "examples/tokio.rs" required-features = ["tokio-example"]