[package]
name = "flutter_rust_bridge"
edition.workspace = true
rust-version = "1.70.0"
version.workspace = true
description.workspace = true
license.workspace = true
repository.workspace = true
keywords.workspace = true
categories.workspace = true
[dependencies]
anyhow = { workspace = true, optional = true }
backtrace = { workspace = true, optional = true }
byteorder = "1.5.0"
chrono = { workspace = true, optional = true }
delegate-attr = "0.3.0"
flutter_rust_bridge_macros = { workspace = true }
futures = { version = "0.3.29", optional = true }
lazy_static = { workspace = true }
log = { version = "0.4", optional = true }
portable-atomic = { version = "1.8.0", optional = true }
uuid = { workspace = true, optional = true }
[target.'cfg(not(target_family = "wasm"))'.dependencies]
allo-isolate = { workspace = true, features = ["anyhow", "backtrace", "zero-copy"] }
dart-sys = { version = "4.1.5", optional = true }
threadpool = { version = "1.8.1", optional = true }
tokio = { version = "1.34.0", optional = true, features = ["rt-multi-thread", "sync"] }
[target.'cfg(target_family = "wasm")'.dependencies]
bytemuck = "1.11.0"
console_error_panic_hook = { version = "0.1.7", optional = true }
js-sys = { version = "0.3.69" }
tokio = { version = "1.34.0", optional = true, features = ["sync"] }
wasm-bindgen = { version = "0.2.92" }
wasm-bindgen-futures = { version = "0.4.42", optional = true }
web-sys = { version = "0.3.58", features = [
"DedicatedWorkerGlobalScope",
"MessageEvent",
"MessagePort",
"ErrorEvent",
"Blob",
"BlobPropertyBag",
"Worker",
"Url",
"BroadcastChannel",
] }
[target.'cfg(target_os = "android")'.dependencies]
android_logger = { version = "0.15", optional = true }
[target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies]
oslog = { version = "0.2.0", optional = true }
[build-dependencies]
build-target = "0.4.0"
[dev-dependencies]
wasm-bindgen-test = "0.3.32"
cool_asserts = "2.0.3"
[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
tokio = { version = "1.34.0", features = ["rt-multi-thread", "sync", "macros"] }
[features]
default = [
"anyhow",
"dart-opaque",
"log",
"portable-atomic",
"rust-async",
"thread-pool",
"user-utils",
"wasm-start",
]
backtrace = ["dep:backtrace", "allo-isolate/backtrace"]
chrono = ["dep:chrono", "allo-isolate/chrono"]
dart-opaque = ["dep:dart-sys"]
portable-atomic = ["dep:portable-atomic"]
rust-async = ["dep:tokio", "dep:futures", "dep:wasm-bindgen-futures"]
thread-pool = ["dep:threadpool"]
user-utils = ["dep:android_logger", "dep:oslog"]
uuid = ["dep:uuid", "allo-isolate/uuid"]
wasm-start = ["console_error_panic_hook"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(frb_expand)'] }