sos-net 0.11.0

Networking library for the Save Our Secrets SDK.
Documentation
[package]
name = "sos-net"
version = "0.11.0"
edition = "2021"
description = "Networking library for the Save Our Secrets SDK."
homepage = "https://saveoursecrets.com"
license = "MIT OR Apache-2.0"
repository = "https://github.com/saveoursecrets/sdk"

[features]
default = []
full = [
  "archive",
  "client",
  "contacts",
  "device",
  "files",
  "hashcheck",
  "listen",
  "migrate",
  "pairing",
  "preferences",
  "search",
  "server",
  "security-report",
  "keychain-access",
  "system-messages",
]
client = [
  "dep:reqwest",
]
listen = ["dep:tokio-tungstenite"]
server = [
  "dep:toml",
  "dep:axum",
  "dep:axum-extra",
  "dep:axum-macros",
  "dep:axum-server",
  "dep:tower",
  "dep:tower-http",
  "dep:tokio-stream",
  "dep:utoipa",
  "dep:utoipa-rapidoc",
  "device",
]
hashcheck = []
archive = ["sos-sdk/archive"]
files = ["sos-sdk/files"]
contacts = ["sos-sdk/contacts"]
migrate = ["sos-sdk/migrate"]
keychain-access = ["sos-sdk/keychain-access"]
device = ["sos-sdk/device"]
recovery = ["sos-sdk/recovery"]
pairing = ["dep:snow"]
preferences = ["sos-sdk/preferences"]
search = ["sos-sdk/search"]
security-report = ["sos-sdk/security-report"]
system-messages = ["sos-sdk/system-messages"]
mem-fs = ["sos-sdk/mem-fs"]
test-utils = ["sos-sdk/test-utils"]

[dependencies]
tokio-util.workspace = true
thiserror.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
async-trait.workspace = true
async-recursion.workspace = true
http.workspace = true
serde_json.workspace = true
serde.workspace = true
uuid.workspace = true
hex.workspace = true
sha3.workspace = true
secrecy.workspace = true
serde_with.workspace = true
once_cell.workspace = true
rand.workspace = true
url.workspace = true
futures.workspace = true
bs58.workspace = true
urlencoding.workspace = true
parking_lot.workspace = true
indexmap.workspace = true
async-stream = "0.3"
colored = "2"

# server
toml = { workspace = true, optional = true }
axum = { version = "0.7", features = ["ws", "original-uri"], optional = true }
axum-extra = {version = "0.9", features = ["typed-header"], optional = true}
axum-macros = { version = "0.4", optional = true }
axum-server = { version = "0.6", features = ["tls-rustls"], optional = true }
tower = { version = "0.4", optional = true }
tower-http = { version = "0.5", features = ["cors", "trace"], optional = true }
tokio-stream = { version = "0.1", optional = true }
tokio-tungstenite = { version = "0.21", features = ["rustls-tls-native-roots"] , optional = true}
utoipa = { version = "4", features = ["uuid"], optional = true }
utoipa-rapidoc = { version = "3", features = ["axum"], optional = true }

# pairing
snow = { version = "0.9", optional = true }

[dependencies.sos-sdk]
version = "0.11.0"
features = ["sync"]
path = "../sdk"

[dependencies.binary-stream]
version = "8.0.0"
features = ["async"]
#path = "../../../../binary-stream"

[target.'cfg(not(target_arch="wasm32"))'.dependencies]
file-guard = "0.1"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "time", "sync", "macros"] }

[target.'cfg(target_arch="wasm32")'.dependencies]
tokio = { version = "1", features = ["rt", "time", "sync"] }

[target.'cfg(target_os="macos")'.dependencies]
reqwest = { version = "0.12.3", default-features = true, features = ["json", "rustls-tls", "stream"], optional = true }

# NOTE: Must disable default-features so that openssl
# NOTE: is not compiled when cross-compiling in CI.
#
# NOTE: If we disable `default-features` during
# NOTE: development then attempting to connect to 
# NOTE: the changes feed using the locally issued mkcert
# NOTE: certificate yields an "Unknown Issuer" error.
# NOTE: Which is related to the `security-framework` not 
# NOTE: being compiled on macos when `default-features` is 
# NOTE: disabled.
[target.'cfg(not(target_os="macos"))'.dependencies]
reqwest = { version = "0.12.3", default-features = false, features = ["json", "rustls-tls", "stream"], optional = true }

[dev-dependencies]
anyhow = "1"

[build-dependencies]
rustc_version = "0.4.0"

[package.metadata.docs.rs]
all-features = true