Files
rsReticulum/crates/rns-interface/Cargo.toml
T
DeFiDude ac9ea27752 Replace invalid AGPL license with Reticulum License
This repository is a port of Reticulum, which is licensed under the Reticulum
License. The AGPL-3.0-or-later grant previously in LICENSE was never
effective, because there was no right to place the derived code under AGPL
terms. The Reticulum License now in LICENSE governs every revision in this
repository's history, not only revisions from this commit forward. Additions
and modifications by Ratspeak LLC remain its copyright and are licensed under
the same terms.
2026-11-07 20:49:18 -07:00

94 lines
3.7 KiB
TOML

[package]
name = "rns-interface"
description = "Network interface trait and implementations for Reticulum"
publish = false
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license-file.workspace = true
[features]
default = []
serial = ["dep:serialport"]
rnode-tcp = []
ble = ["dep:btleplug", "dep:futures", "dep:uuid", "dep:bluer"]
# See rns-transport's mobile-throttle. When enabled, auto-interface beacons
# and reverse-peering probes slow down in the background; BLE peer scan
# cadence adjusts to `is_foreground`. Disabled on desktop builds.
mobile-throttle = ["rns-transport/mobile-throttle"]
[dependencies]
rns-crypto = { workspace = true, features = ["std"] }
rns-wire = { workspace = true, features = ["std"] }
rns-identity = { workspace = true }
rns-transport = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
bytes = { workspace = true }
tracing = { workspace = true }
socket2 = { workspace = true }
if-addrs = { workspace = true }
serialport = { workspace = true, optional = true }
btleplug = { version = "=0.13.4", optional = true }
futures = { version = "0.3", optional = true }
uuid = { version = "1", optional = true }
rand = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
hex = { workspace = true }
md-5 = { workspace = true }
# Apple BLE Peripheral (CoreBluetooth GATT server, iOS + macOS).
# These native owners do not exchange Objective-C types with btleplug. Keep
# their binding generation and required features explicit. objc2-core-bluetooth gives us
# linked-symbol access to NSString constants (CBCentralManagerScanOption*,
# CB*RestoreIdentifierKey, etc.) instead of re-declaring their literal
# values, which Apple is free to change.
[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
objc2 = "0.5"
objc2-foundation = { version = "0.2", features = ["NSString"] }
objc2-core-bluetooth = { version = "0.2", features = ["CBAdvertisementData", "CBCentralManagerConstants"] }
[target.'cfg(target_os = "macos")'.dependencies]
libc = "0.2"
[dev-dependencies]
tokio = { workspace = true, features = ["test-util"] }
# Keepalive-tuning tests read socket options back via getsockopt.
[target.'cfg(unix)'.dev-dependencies]
libc = "0.2"
# Android JNI (BLE Peripheral, USB Serial)
[target.'cfg(target_os = "android")'.dependencies]
jni = "0.19"
# Linux BLE Peripheral via BlueZ D-Bus (real GATT server, B7).
# Linux-only target dep so non-Linux builds don't pull in BlueZ. The
# linux_peripheral module is gated by both `ble` feature and target_os.
[target.'cfg(target_os = "linux")'.dependencies]
bluer = { version = "0.17", features = ["bluetoothd"], optional = true }
# Windows BLE Peripheral via WinRT GattServiceProvider (MSIX-packaged apps).
# Windows-only target dep so cross-platform builds don't pull in WinRT
# shims. The windows_peripheral module is gated by `ble` feature and
# target_os. GattServiceProvider.CreateAsync returns AccessDenied for
# unpackaged Win32 binaries; we surface that as a clear peripheral-
# unavailable event so embedding UIs can direct users to an MSIX build for
# discoverability.
[target.'cfg(target_os = "windows")'.dependencies]
# Resolution floor for Tokio's socket backend: older Mio lets child processes
# inherit sockets and keep shared/network listeners alive after shutdown.
# 1.2.3 includes the no-inheritance fix and its Wine compatibility follow-up.
# https://github.com/tokio-rs/mio/pull/1946
mio = { version = "1.2.3", default-features = false }
windows = { version = "0.58", features = [
"Devices_Bluetooth",
"Devices_Bluetooth_Advertisement",
"Devices_Bluetooth_GenericAttributeProfile",
"Devices_Radios",
"Foundation",
"Foundation_Collections",
"Storage_Streams",
] }