[workspace]
members = [
    "veilid-tools",
    "veilid-core",
    "veilid-server",
    "veilid-cli",
    "veilid-flutter/rust",
    "veilid-wasm",
]
resolver = "2"

[workspace.package]
repository = "https://gitlab.com/veilid/veilid"
authors = ["Veilid Team <contact@veilid.com>"]
license = "MPL-2.0"
edition = "2021"
rust-version = "1.81.0"

[patch.crates-io]
cursive = { git = "https://gitlab.com/veilid/cursive.git" }
cursive_core = { git = "https://gitlab.com/veilid/cursive.git" }

# For local development
# keyvaluedb = { path = "../keyvaluedb/keyvaluedb" }
# keyvaluedb-memorydb = { path = "../keyvaluedb/keyvaluedb-memorydb" }
# keyvaluedb-sqlite = { path = "../keyvaluedb/keyvaluedb-sqlite" }
# keyvaluedb-web = { path = "../keyvaluedb/keyvaluedb-web" }
# igd = { package = "veilid-igd", path = "../rust-igd" }

[profile.release]
opt-level = "s"
lto = true

[profile.dev.package.backtrace]
opt-level = 3

[profile.dev.package.argon2]
opt-level = 3
debug-assertions = false

[profile.dev.package.ed25519-dalek]
opt-level = 3
debug-assertions = false

[profile.dev.package.x25519-dalek]
opt-level = 3
debug-assertions = false

[profile.dev.package.curve25519-dalek]
opt-level = 3
debug-assertions = false

[profile.dev.package.chacha20poly1305]
opt-level = 3
debug-assertions = false

[profile.dev.package.blake3]
opt-level = 3
debug-assertions = false

[profile.dev.package.chacha20]
opt-level = 3
debug-assertions = false

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
must_use_candidate = "deny"
large_futures = "deny"
large_stack_arrays = "deny"
large_stack_frames = "deny"
large_types_passed_by_value = "deny"
unused_async = "deny"
ptr_cast_constness = "deny"
comparison_chain = "allow"
upper_case_acronyms = "allow"
needless_range_loop = "allow"

[workspace.lints.rust]
unused_must_use = "deny"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tokio_unstable)'] }
