[workspace]
default-members = ["crates/ui", "crates/story", "crates/assets"]
members = [
    "crates/macros",
    "crates/story",
    "crates/story-web",
    "crates/ui",
    "crates/assets",
    "crates/webview",
    "examples/app_assets",
    "examples/hello_world",
    "examples/input",
    "examples/window_title",
    "examples/dialog_overlay",
    "examples/webview",
    "examples/system_monitor",
    "examples/focus_trap",
]
resolver = "2"

[workspace.package]
publish = false
edition = "2024"

[workspace.dependencies]
gpui-component = { path = "crates/ui", version = "0.5.1" }
gpui-component-macros = { path = "crates/macros", version = "0.5.1" }
gpui-component-assets = { path = "crates/assets", version = "0.5.1" }
story = { path = "crates/story" }

gpui = { git = "https://github.com/zed-industries/zed" }
gpui_platform = { git = "https://github.com/zed-industries/zed", features = ["font-kit", "x11", "wayland", "runtime_shaders"] }
gpui_web = { git = "https://github.com/zed-industries/zed" }
gpui_macros = { git = "https://github.com/zed-industries/zed" }
reqwest_client = { git = "https://github.com/zed-industries/zed" }
sum-tree = { version = "0.2.0", package = "zed-sum-tree" }
# reqwest = { version = "0.12.15-zed", package = "zed-reqwest" }
reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "c15662463bda39148ba154100dd44d3fba5873a4", default-features = false, features = [
    "charset",
    "http2",
    "macos-system-configuration",
    "multipart",
    "rustls-tls-native-roots",
    "socks",
    "stream",
], package = "zed-reqwest", version = "0.12.15-zed" }

anyhow = "1"
log = "0.4"
lsp-types = { version = "0.97.0", features = ["proposed"] }
notify = "7.0.0"
raw-window-handle = "0.6.2"
ropey = { version = "=2.0.0-beta.1", features = [
    "metric_lines_lf",
    "metric_utf16",
] }
rust-i18n = "3"
schemars = "1"
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1"
serde_repr = "0.1"
smallvec = "1"
smol = "2"
tracing = "0.1.41"
wasm-bindgen = "0.2.113"
# Use errno stub for WASM
errno = { version = "0.3.14", default-features = false }

[workspace.dependencies.windows]
features = ["Wdk", "Wdk_System", "Wdk_System_SystemServices"]
version = "0.58.0"

[workspace.lints.clippy]
almost_complete_range = "allow"
arc_with_non_send_sync = "allow"
borrowed_box = "allow"
dbg_macro = "deny"
let_underscore_future = "allow"
manual_is_multiple_of = "allow"
map_entry = "allow"
module_inception = "allow"
non_canonical_partial_ord_impl = "allow"
reversed_empty_ranges = "allow"
single_range_in_vec_init = "allow"
style = { level = "allow", priority = -1 }
todo = "deny"
type_complexity = "allow"
# Temporarily allow this until we can migrate to the new APIs.
# https://github.com/longbridge/gpui-component/pull/2149
useless_conversion = "allow"

[profile.dev]
codegen-units = 16
debug = "limited"
split-debuginfo = "unpacked"

[profile.dev.package]
resvg = { opt-level = 3 }
rustybuzz = { opt-level = 3 }
taffy = { opt-level = 3 }
ttf-parser = { opt-level = 3 }
smol = { opt-level = 3 }
gpui = { opt-level = 3 }
gpui_platform = { opt-level = 3 }
gpui_macros = { opt-level = 3 }
tree-sitter = { opt-level = 3 }
sum_tree = { opt-level = 3 }
ropey = { opt-level = 3 }
lsp-types = { opt-level = 3 }
reqwest_client = { opt-level = 3 }
markdown = { opt-level = 3 }
xml5ever = { opt-level = 3 }

[workspace.metadata.typos]
files.extend-exclude = ["**/fixtures/*"]

[workspace.metadata.typos.default.extend-identifiers]
consts = "consts"

[workspace.metadata.cargo-machete]
ignored = ["log", "anyhow", "serde"]

# Patches for WASM compatibility
[patch.crates-io]
# Use stacker's psm version which may have better WASM support
psm = { git = "https://github.com/rust-lang/stacker", branch = "master" }
