Files
sqm-autorate-rust/Cargo.toml
T
Nils Andreas Svee 7b0eb942ea fix(deps): patch netlink-socket2 to support musl targets
Vendor netlink-socket2 to resolve compilation failures caused by direct struct-literal initialization of libc types on musl.
2026-04-14 15:00:49 +07:00

45 lines
1.1 KiB
TOML

[package]
name = "sqm-autorate-rust"
version = "0.4.1"
edition = "2024"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[profile.dev]
codegen-units = 1
lto = true
opt-level = 's'
[profile.release]
codegen-units = 1
lto = true
opt-level = 'z'
panic = "abort"
strip = "symbols"
[dependencies]
anyhow = "1.0"
icmp-socket2 = "0.4.2"
netlink-bindings = { version = "0.3", features = ["rt-link", "tc"] }
netlink-socket2 = "0.3"
fastrand = "2"
rustix = { version = "1.1", features = ["fs", "system", "thread", "time"] }
rust-uci = { version = "0.1", optional = true }
thiserror = "2.0"
libc = "0.2"
[dependencies.log]
features = ["std"]
version = "0.4"
[features]
uci = ["dep:rust-uci"]
[patch.crates-io]
# netlink-socket2 0.3.0 uses struct-literal syntax for libc::msghdr/cmsghdr which
# fails on musl (private __pad1/__pad2 fields, u32 vs usize for cmsg_len).
# Remove this patch once a fixed version is published upstream.
# Upstream PR: https://github.com/one-d-wide/netlink-bindings/pull/12
netlink-socket2 = { path = "vendor/netlink-socket2" }