[package]
name = "geiserx_ts_netstack_smoltcp_core"
version.workspace = true
description = "command-channel-based userspace netstack built on smoltcp (core functionality)"
categories = ["no-std", "network-programming"]
keywords = ["tailscale", "network", "smoltcp", "netstack"]

repository.workspace = true
edition.workspace = true
license.workspace = true
rust-version.workspace = true


[lib]
name = "ts_netstack_smoltcp_core"
[lints]
workspace = true

[dependencies]
bytes.workspace = true
flume.workspace = true
heapless.workspace = true
thiserror.workspace = true
tracing.workspace = true

[dependencies.smoltcp]
workspace = true
default-features = false
features = [
    "alloc",
    "proto-ipv6",
    "proto-ipv6-fragmentation",
    "proto-ipv4",
    "proto-ipv4-fragmentation",
    "medium-ip",
    "socket-tcp",
    "socket-udp",
    "socket-icmp",
    "socket-raw",
    # IPv6-on-overlay (gated, default off) assigns up to 3 interface addresses (v4 /32 + v6 /128,
    # plus headroom). smoltcp defaults to iface-max-addr-count-2, which would silently overflow
    # (direct_set_ips returns false → netstack gets no addresses) the moment the IPv6 gate is on.
    "iface-max-addr-count-5",
]

[dev-dependencies]
tracing-panic = { version = "0.1", features = ["capture-backtrace"] }
ts_cli_util.workspace = true

[dev-dependencies.smoltcp]
version = "0.13"
default-features = false
features = [
    "alloc",
    "proto-ipv6",
    "proto-ipv6-fragmentation",
    "proto-ipv4",
    "proto-ipv4-fragmentation",
    "medium-ip",
    "socket-tcp",
    "socket-udp",
    "socket-icmp",
    "socket-raw",
    "iface-max-addr-count-5",
    "log",
    "verbose",
]

[features]
# provide From<Error> for std::io::Error
std = []
