mirror of
https://github.com/ratspeak/rsReticulum
synced 2026-11-22 23:10:33 +00:00
94 lines
3.8 KiB
TOML
94 lines
3.8 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.6"
|
|
objc2-foundation = { version = "0.3", default-features = false, features = ["std", "NSString"] }
|
|
objc2-core-bluetooth = { version = "0.3", default-features = false, features = ["std", "CBAdvertisementData", "CBCentralManagerConstants", "CBPeripheralManagerConstants"] }
|
|
|
|
[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",
|
|
] }
|