[package] name = "weaver-common" version.workspace = true edition.workspace = true license.workspace = true publish = false [features] default = [ "use-index"] native = ["jacquard/dns"] use-index = [] iroh = ["dep:iroh", "dep:iroh-gossip", "dep:iroh-tickets"] telemetry = ["dep:metrics", "dep:metrics-exporter-prometheus", "dep:tracing-subscriber", "dep:tracing-loki", "dep:axum"] cache = ["dep:mini-moka-wasm"] perf = [] [dependencies] n0-future = { workspace = true } weaver-api = { version = "0.1", path = "../weaver-api" } markdown-weaver = { workspace = true } http = "1.3.1" jacquard = { workspace = true } jacquard-common = { workspace = true } trait-variant = "0.1" serde = { workspace = true } serde_json = { version = "1.0.140", features = ["preserve_order", "raw_value"] } tokio = { version = "1.44", features = ["sync"] } miette = { workspace = true } thiserror = { workspace = true } tracing = { workspace = true } reqwest = { version = "0.12", default-features = false, features = [ "json", ] } markdown-weaver-escape = { workspace = true, features = ["std"] } mime-sniffer = "^0.1" # Real-time collaboration transport (iroh P2P) chrono = "0.4" blake3 = { version = "1", default-features = false, features = ["pure"] } postcard = "1.1.1" rand = "0.9.2" web-time = "1" iroh = { version = "0.95", default-features = false, optional = true } iroh-gossip = { version = "0.95", default-features = false, features = ["net"], optional = true } iroh-tickets = { version = "0.2", optional = true } # Telemetry (optional, native-only) metrics = { version = "0.24.2", optional = true } metrics-exporter-prometheus = { version = "0.17.2", optional = true } tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"], optional = true } tracing-loki = { version = "0.2", optional = true } axum = { version = "0.8", optional = true } getrandom = { version = "0.3", features = [] } ring = { version = "0.17", default-features = false } # TTL cache (optional) - mini-moka-wasm works on both native and WASM mini-moka-wasm = { version = "0.10.99", optional = true } [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] regex = "1.11.1" # wasm-in-browser dependencies [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] regex-lite = { version = "0.1" } futures-util = "0.3" js-sys = "0.3" pin-project = "1" wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" send_wrapper = "0.6" wasmworker = "0.1" wasmworker-proc-macro = "0.1" ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js"]} getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] } web-sys = { version = "0.3", features = ["Window", "Performance"] } [dev-dependencies] tokio = { version = "1", features = ["macros", "rt"] }