[workspace] default-members = ["crates/story"] members = [ "crates/kit", "crates/base", "crates/base/examples/wasm", "crates/base/examples/native", "crates/component-macros", "crates/story", "crates/story-web", "crates/component", "crates/assets", "crates/fps", "crates/webview", "examples/app_assets", "examples/fps_monitor", "examples/hello_world", "examples/input", "examples/editor", "examples/syntect", "examples/tig", "examples/brush", "examples/dock", "examples/html", "examples/large-text", "examples/markdown", "examples/stream-markdown", "examples/window_title", "examples/dialog_overlay", "examples/webview", "examples/system_monitor", "examples/focus_trap", "examples/tooltip_top_edge", "examples/link_tooltip", "examples/sidebar", "examples/text_max_lines", "examples/text_selection", "examples/touch_selection", "examples/table_in_scrollable", "examples/markdown_table", "examples/ai_recipes", "examples/speech", "crates/shell", ] resolver = "2" [workspace.package] publish = false edition = "2024" [workspace.dependencies] gpui-kit = { path = "crates/kit", version = "0.9.1" } gpui-component = { path = "crates/component", version = "0.9.1" } gpui-base = { path = "crates/base", version = "0.9.1" } gpui-component-macros = { path = "crates/component-macros", version = "0.9.1" } gpui-kit-assets = { path = "crates/assets", version = "0.9.1" } gpui-fps = { path = "crates/fps", version = "0.9.1" } gpui-shell = { path = "crates/shell", version = "0.9.1" } gpui-webview = { path = "crates/webview", version = "0.9.1" } story = { path = "crates/story" } # GPUI comes from the `gpui-pre-*` snapshots of Zed's crates, and any snapshot # may change GPUI's API. These requirements are what the published gpui-kit # crates carry to crates.io, so they pin the exact snapshot the release was # built against: a caret requirement let the weekly release move applications # onto a newer snapshot that gpui-component did not compile with (#3156). Bump # every snapshot crate together with its Cargo.lock entry; `script/check-gpui-pin.ts` # fails CI when a pin is not exact. gpui = { package = "gpui-pre", version = "=0.3.12" } gpui_platform = { package = "gpui-pre-platform", version = "=0.3.12", features = ["font-kit", "x11", "wayland", "runtime_shaders"] } gpui_web = { package = "gpui-pre-web", version = "=0.3.12" } # Fast is optional; existing crates select it through their gpui-fast feature. # Explicit package fields make Cargo use these dependency keys as Rust crate names; # the packages declare the same library names as the pre backend. gpui-fast = { package = "gpui-fast", version = "0.1.14", features = ["windows-manifest-provided-by-host"] } gpui-fast-platform = { package = "gpui-fast-platform", version = "0.1.14", features = ["font-kit", "x11", "wayland", "runtime_shaders"] } gpui-fast-web = { package = "gpui-fast-web", version = "0.1.14" } gpui_macros = { package = "gpui-pre-macros", version = "=0.3.12" } reqwest_client = { package = "gpui-pre-reqwest-client", version = "=0.3.12" } sum-tree = { package = "gpui-pre-sum-tree", version = "=0.3.12" } reqwest = { package = "gpui-pre-reqwest", version = "=0.12.15", default-features = false, features = [ "charset", "http2", "macos-system-configuration", "multipart", "rustls-tls-native-roots", "socks", "stream", ] } anyhow = "1" instant = { version = "0.1", features = ["wasm-bindgen"] } log = "0.4" lsp-types = { version = "0.97.0", features = ["proposed"] } notify = "8.2.0" raw-window-handle = "0.6.2" ropey = { version = "=2.0.0-beta.1", features = [ "metric_chars", "metric_lines_lf", "metric_utf16", ] } rust-i18n = "4.2.0" schemars = "1" semver = "1" serde = { version = "1.0.219", features = ["derive"] } serde_json = "1" serde_repr = "0.1" smallvec = "1" smol = "2" syntect = { version = "5.3.0", default-features = false, features = [ "parsing", "default-syntaxes", "regex-fancy", ] } two-face = { version = "0.4.5", default-features = false, features = ["syntect-fancy"] } 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" redundant_clone = "deny" 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-kit/pull/2149 useless_conversion = "allow" # Keep Cargo's default of 256 codegen units. Incremental builds re-codegen # whole units, so with 16 units a one-line change in gpui-component or # gpui-base took about 50% more CPU to rebuild. [profile.dev] debug = "limited" split-debuginfo = "unpacked" # These speed up the debug application at run time; opt-level 1 rendered the # `text_view_scroll` bench frames 22-25% slower to save about 9% of a clean # build's CPU, and nothing on an incremental one. Proc-macro crates are left # out: they only run inside the compiler, and expanding gpui's macros takes as # long unoptimized, so optimizing them only adds compile time. [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-pre = { opt-level = 3 } gpui-fast = { opt-level = 3 } gpui-fast-platform = { opt-level = 3 } gpui-pre-platform = { opt-level = 3 } tree-sitter = { opt-level = 3 } gpui-pre-sum-tree = { opt-level = 3 } ropey = { opt-level = 3 } lsp-types = { opt-level = 3 } gpui-pre-reqwest-client = { opt-level = 3 } markdown = { opt-level = 3 } xml5ever = { opt-level = 3 } # `quickjs-jit` is a facade that re-exports `quickjs-jit-core`, so naming it alone # optimises neither the interpreter nor the bindings. `quickjs-jit-sys` builds # QuickJS itself through `cc`, which reads this package's opt-level; without # these two a debug build spends roughly three times as long in every script # render. See `website/shell/hosting.md`. quickjs-jit = { opt-level = 3 } quickjs-jit-runtime = { opt-level = 3 } quickjs-jit-sys = { opt-level = 3 } quickjs-jit-core = { opt-level = 3 } cap-std = { opt-level = 3 } # Stripping the symbol table costs no build time and removes about a quarter of # a release binary (`gpui-shell`: 106 MB to 78 MB on Linux x86_64). [profile.release] strip = "symbols" [workspace.metadata.typos] files.extend-exclude = ["**/fixtures/*"] [workspace.metadata.typos.default.extend-identifiers] consts = "consts" [workspace.metadata.cargo-machete] ignored = ["log", "anyhow", "serde"]