ts_netstack_smoltcp 0.2.0

userspace netstack built on smoltcp
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.91.0"
name = "ts_netstack_smoltcp"
version = "0.2.0"
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "userspace netstack built on smoltcp"
readme = "README.md"
keywords = [
    "tailscale",
    "socket",
    "network",
    "smoltcp",
    "netstack",
]
categories = [
    "no-std",
    "network-programming",
]
license = "BSD-3-Clause"
repository = "https://github.com/tailscale/tailscale-rs"

[features]
futures-io = [
    "ts_netstack_smoltcp_socket/futures-io",
    "std",
]
std = ["ts_netstack_smoltcp_socket/std"]
tokio = [
    "dep:tokio",
    "ts_netstack_smoltcp_socket/tokio",
    "std",
]
tun = ["dep:tun-rs"]

[lib]
name = "ts_netstack_smoltcp"
path = "src/lib.rs"

[[example]]
name = "axum_tun"
path = "examples/axum_tun/main.rs"
required-features = [
    "tun",
    "tokio",
]

[[example]]
name = "tcp_connect_tun"
path = "examples/tcp_connect_tun.rs"
required-features = [
    "tun",
    "std",
]

[[example]]
name = "tcp_connect_tun_async"
path = "examples/tcp_connect_tun_async.rs"
required-features = [
    "tun",
    "std",
    "tokio",
]

[[example]]
name = "tcp_listen_tun"
path = "examples/tcp_listen_tun.rs"
required-features = [
    "tun",
    "std",
]

[[example]]
name = "tcp_listen_tun_async"
path = "examples/tcp_listen_tun_async.rs"
required-features = [
    "tun",
    "std",
    "tokio",
]

[[example]]
name = "tcp_pingpong_pipe"
path = "examples/tcp_pingpong_pipe.rs"
required-features = ["std"]

[[example]]
name = "tcp_pingpong_pipe_async"
path = "examples/tcp_pingpong_pipe_async.rs"
required-features = ["tokio"]

[[example]]
name = "udp_tun"
path = "examples/udp_tun.rs"
required-features = [
    "tun",
    "std",
]

[[example]]
name = "udp_tun_async"
path = "examples/udp_tun_async.rs"
required-features = [
    "tun",
    "std",
    "tokio",
]

[[bench]]
name = "throughput_tcp"
path = "benches/throughput_tcp.rs"
harness = false
required-features = ["tokio"]

[[bench]]
name = "throughput_udp"
path = "benches/throughput_udp.rs"
harness = false
required-features = ["tokio"]

[dependencies.bytes]
version = "1"

[dependencies.futures-util]
version = "0.3"
default-features = false

[dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "time",
]
optional = true
default-features = false

[dependencies.tracing]
version = "0.1"
features = ["attributes"]
default-features = false

[dependencies.ts_netstack_smoltcp_core]
version = "0.2.0"

[dependencies.ts_netstack_smoltcp_socket]
version = "0.2.0"

[dependencies.tun-rs]
version = "2.8"
features = ["interruptible"]
optional = true

[dev-dependencies.axum]
version = "0.8"

[dev-dependencies.clap]
version = "4"
features = ["derive"]

[dev-dependencies.console-subscriber]
version = "0.5"

[dev-dependencies.include_dir]
version = "0.7"

[dev-dependencies.mime_guess]
version = "2.0"

[dev-dependencies.rand]
version = "0.10"

[dev-dependencies.tokio]
version = "1"
features = [
    "rt-multi-thread",
    "macros",
    "full",
]
default-features = false

[dev-dependencies.tracing]
version = "0.1"
features = [
    "attributes",
    "release_max_level_off",
]
default-features = false

[dev-dependencies.tracing-panic]
version = "0.1"

[dev-dependencies.tun-rs]
version = "2.8"
features = [
    "async",
    "async_framed",
]

[lints.clippy]
multiple_crate_versions = "allow"
too_many_arguments = "allow"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.rust]
closure_returning_async_block = "warn"
let-underscore = "warn"
missing_docs = "warn"

[lints.rustdoc]
bare_urls = "deny"
broken_intra_doc_links = "deny"
invalid_html_tags = "deny"
private_intra_doc_links = "deny"