Cargo.toml

  1[workspace]
  2resolver = "2"
  3members = ["crates/askpass", "crates/assets", "crates/clock", "crates/collections", "crates/fs", "crates/fsevent", "crates/git", "crates/gpui", "crates/gpui_macros", "crates/http_client", "crates/http_client_tls", "crates/icons", "crates/media", "crates/migrator", "crates/net", "crates/paths", "crates/proto", "crates/refineable", "crates/release_channel", "crates/reqwest_client", "crates/rope", "crates/scheduler", "crates/settings", "crates/settings_json", "crates/settings_macros", "crates/sum_tree", "crates/text", "crates/theme", "crates/util", "crates/util_macros", "crates/zlog", "crates/ztracing", "crates/ztracing_macro", "tooling/perf"]
  4
  5[workspace.package]
  6publish = false
  7edition = "2024"
  8
  9
 10[workspace.dependencies.windows]
 11version = "0.61"
 12features = [
 13    "Foundation_Numerics",
 14    "Storage_Search",
 15    "Storage_Streams",
 16    "System_Threading",
 17    "UI_ViewManagement",
 18    "Wdk_System_SystemServices",
 19    "Win32_Globalization",
 20    "Win32_Graphics_Direct3D",
 21    "Win32_Graphics_Direct3D11",
 22    "Win32_Graphics_Direct3D_Fxc",
 23    "Win32_Graphics_DirectComposition",
 24    "Win32_Graphics_DirectWrite",
 25    "Win32_Graphics_Dwm",
 26    "Win32_Graphics_Dxgi",
 27    "Win32_Graphics_Dxgi_Common",
 28    "Win32_Graphics_Gdi",
 29    "Win32_Graphics_Imaging",
 30    "Win32_Graphics_Hlsl",
 31    "Win32_Networking_WinSock",
 32    "Win32_Security",
 33    "Win32_Security_Credentials",
 34    "Win32_Security_Cryptography",
 35    "Win32_Storage_FileSystem",
 36    "Win32_System_Com",
 37    "Win32_System_Com_StructuredStorage",
 38    "Win32_System_Console",
 39    "Win32_System_DataExchange",
 40    "Win32_System_IO",
 41    "Win32_System_LibraryLoader",
 42    "Win32_System_Memory",
 43    "Win32_System_Ole",
 44    "Win32_System_Performance",
 45    "Win32_System_Pipes",
 46    "Win32_System_SystemInformation",
 47    "Win32_System_SystemServices",
 48    "Win32_System_Threading",
 49    "Win32_System_Variant",
 50    "Win32_System_WinRT",
 51    "Win32_UI_Controls",
 52    "Win32_UI_HiDpi",
 53    "Win32_UI_Input_Ime",
 54    "Win32_UI_Input_KeyboardAndMouse",
 55    "Win32_UI_Shell",
 56    "Win32_UI_Shell_Common",
 57    "Win32_UI_Shell_PropertiesSystem",
 58    "Win32_UI_WindowsAndMessaging",
 59]
 60
 61[profile.dev]
 62split-debuginfo = "unpacked"
 63# https://github.com/rust-lang/cargo/issues/16104
 64incremental = false
 65codegen-units = 16
 66
 67# mirror configuration for crates compiled for the build platform
 68# (without this cargo will compile ~400 crates twice)
 69[profile.dev.build-override]
 70codegen-units = 16
 71
 72[profile.dev.package]
 73# proc-macros start
 74gpui_macros = { opt-level = 3 }
 75derive_refineable = { opt-level = 3 }
 76settings_macros = { opt-level = 3 }
 77sqlez_macros = { opt-level = 3, codegen-units = 1 }
 78ui_macros = { opt-level = 3 }
 79util_macros = { opt-level = 3 }
 80quote = { opt-level = 3 }
 81syn = { opt-level = 3 }
 82proc-macro2 = { opt-level = 3 }
 83# proc-macros end
 84
 85taffy = { opt-level = 3 }
 86resvg = { opt-level = 3 }
 87wasmtime = { opt-level = 3 }
 88# Build single-source-file crates with cg=1 as it helps make `cargo build` of a whole workspace a bit faster
 89activity_indicator = { codegen-units = 1 }
 90assets = { codegen-units = 1 }
 91breadcrumbs = { codegen-units = 1 }
 92collections = { codegen-units = 1 }
 93command_palette = { codegen-units = 1 }
 94command_palette_hooks = { codegen-units = 1 }
 95feature_flags = { codegen-units = 1 }
 96file_icons = { codegen-units = 1 }
 97fsevent = { codegen-units = 1 }
 98image_viewer = { codegen-units = 1 }
 99edit_prediction_ui = { codegen-units = 1 }
100install_cli = { codegen-units = 1 }
101journal = { codegen-units = 1 }
102json_schema_store = { codegen-units = 1 }
103lmstudio = { codegen-units = 1 }
104menu = { codegen-units = 1 }
105notifications = { codegen-units = 1 }
106ollama = { codegen-units = 1 }
107outline = { codegen-units = 1 }
108paths = { codegen-units = 1 }
109prettier = { codegen-units = 1 }
110project_symbols = { codegen-units = 1 }
111refineable = { codegen-units = 1 }
112release_channel = { codegen-units = 1 }
113reqwest_client = { codegen-units = 1 }
114session = { codegen-units = 1 }
115snippet = { codegen-units = 1 }
116snippets_ui = { codegen-units = 1 }
117story = { codegen-units = 1 }
118supermaven_api = { codegen-units = 1 }
119telemetry_events = { codegen-units = 1 }
120theme_selector = { codegen-units = 1 }
121time_format = { codegen-units = 1 }
122ui_input = { codegen-units = 1 }
123zed_actions = { codegen-units = 1 }
124
125[profile.release]
126debug = "limited"
127lto = "thin"
128codegen-units = 1
129
130[profile.release.package]
131zed = { codegen-units = 16 }
132
133[profile.release-fast]
134inherits = "release"
135debug = "full"
136lto = false
137codegen-units = 16
138
139[workspace.lints.rust]
140unexpected_cfgs = { level = "allow" }
141
142[workspace.lints.clippy]
143dbg_macro = "deny"
144todo = "deny"
145
146declare_interior_mutable_const = "deny"
147
148redundant_clone = "deny"
149disallowed_methods = "deny"
150
151# We currently do not restrict any style rules
152# as it slows down shipping code to Zed.
153#
154# Running ./script/clippy can take several minutes, and so it's
155# common to skip that step and let CI do it. Any unexpected failures
156# (which also take minutes to discover) thus require switching back
157# to an old branch, manual fixing, and re-pushing.
158#
159# In the future we could improve this by either making sure
160# Zed can surface clippy errors in diagnostics (in addition to the
161# rust-analyzer errors), or by having CI fix style nits automatically.
162style = { level = "allow", priority = -1 }
163
164# Individual rules that have violations in the codebase:
165type_complexity = "allow"
166let_underscore_future = "allow"
167
168# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
169# warning on this rule produces a lot of noise.
170single_range_in_vec_init = "allow"
171
172# in Rust it can be very tedious to reduce argument count without
173# running afoul of the borrow checker.
174too_many_arguments = "allow"
175
176# We often have large enum variants yet we rarely actually bother with splitting them up.
177large_enum_variant = "allow"
178
179# Boolean expressions can be hard to read, requiring only the minimal form gets in the way
180nonminimal_bool = "allow"
181
182[workspace.dependencies]
183anyhow = "1.0.86"
184ashpd = { version = "0.11", default-features = false, features = ["async-std"] }
185askpass = { path = "crates/askpass" }
186assets = { path = "crates/assets" }
187async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
188async-fs = "2.1"
189async-tar = "0.5.1"
190async-task = "4.7"
191async-trait = "0.1"
192async_zip = { version = "0.0.18", features = ["deflate", "deflate64"] }
193backtrace = "0.3"
194bitflags = "2.6.0"
195blade-graphics = { version = "0.7.0" }
196blade-macros = { version = "0.3.0" }
197blade-util = { version = "0.3.0" }
198bytes = "1.0"
199chrono = { version = "0.4", features = ["serde"] }
200circular-buffer = "1.0"
201clock = { path = "crates/clock" }
202cocoa = "=0.26.0"
203cocoa-foundation = "=0.2.0"
204collections = { path = "crates/collections", version = "0.1.0" }
205convert_case = "0.8.0"
206core-foundation = "=0.10.0"
207core-foundation-sys = "0.8.6"
208core-video = { version = "0.4.3", features = ["metal"] }
209criterion = { version = "0.5", features = ["html_reports"] }
210ctor = "0.4.0"
211derive_more = "0.99.17"
212derive_refineable = { path = "crates/refineable/derive_refineable" }
213dirs = "4.0"
214ec4rs = "1.1"
215env_logger = "0.11"
216fs = { path = "crates/fs" }
217fsevent = { path = "crates/fsevent" }
218futures = "0.3"
219futures-lite = "1.13"
220git = { path = "crates/git" }
221git2 = { version = "0.20.1", default-features = false }
222globset = "0.4"
223gpui = { path = "crates/gpui", default-features = false }
224gpui_macros = { path = "crates/gpui_macros" }
225heck = "0.5"
226http = "1.1"
227http-body = "1.0"
228http_client = { path = "crates/http_client" }
229http_client_tls = { path = "crates/http_client_tls" }
230icons = { path = "crates/icons" }
231ignore = "0.4.22"
232image = "0.25.1"
233indexmap = { version = "2.7.0", features = ["serde"] }
234indoc = "2"
235inventory = "0.3.19"
236itertools = "0.14.0"
237libc = "0.2"
238log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
239mach2 = "0.5"
240media = { path = "crates/media" }
241metal = "0.29"
242migrator = { path = "crates/migrator" }
243naga = { version = "25.0", features = ["wgsl-in"] }
244net = { path = "crates/net" }
245nix = "0.29"
246objc = "0.2"
247palette = { version = "0.7.5", default-features = false, features = ["std"] }
248parking_lot = "0.12.1"
249paths = { path = "crates/paths" }
250perf = { path = "tooling/perf" }
251postage = { version = "0.5", features = ["futures-traits"] }
252pretty_assertions = { version = "1.3.0", features = ["unstable"] }
253proc-macro2 = "1.0.93"
254profiling = "1"
255prost = "0.9"
256prost-build = "0.9"
257proto = { path = "crates/proto" }
258quote = "1.0.9"
259rand = "0.9"
260rayon = "1.8"
261refineable = { path = "crates/refineable" }
262regex = "1.5"
263release_channel = { path = "crates/release_channel" }
264reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "c15662463bda39148ba154100dd44d3fba5873a4", default-features = false, features = [
265    "charset",
266    "http2",
267    "macos-system-configuration",
268    "multipart",
269    "rustls-tls-native-roots",
270    "socks",
271    "stream",
272], package = "zed-reqwest", version = "0.12.15-zed" }
273reqwest_client = { path = "crates/reqwest_client" }
274rope = { path = "crates/rope" }
275rust-embed = { version = "8.4", features = ["include-exclude"] }
276rustc-hash = "2.1.0"
277rustls = { version = "0.23.26" }
278rustls-platform-verifier = "0.5.0"
279scap = { git = "https://github.com/zed-industries/scap", rev = "4afea48c3b002197176fb19cd0f9b180dd36eaac", default-features = false, package = "zed-scap", version = "0.0.8-zed" }
280schemars = { version = "1.0", features = ["indexmap2"] }
281semver = { version = "1.0", features = ["serde"] }
282serde = { version = "1.0.221", features = ["derive", "rc"] }
283serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] }
284serde_json_lenient = { version = "0.2", features = [
285    "preserve_order",
286    "raw_value",
287] }
288serde_path_to_error = "0.1.17"
289serde_repr = "0.1"
290serde_urlencoded = "0.7"
291settings = { path = "crates/settings" }
292settings_json = { path = "crates/settings_json" }
293settings_macros = { path = "crates/settings_macros" }
294sha2 = "0.10"
295shlex = "1.3.0"
296slotmap = "1.0.6"
297smallvec = { version = "1.6", features = ["union", "const_new"] }
298smol = "2.0"
299stacksafe = "0.1"
300streaming-iterator = "0.1"
301strum = { version = "0.27.2", features = ["derive"] }
302sum_tree = { path = "crates/sum_tree" }
303syn = { version = "2.0.101", features = ["full", "extra-traits", "visit-mut"] }
304take-until = "0.2.0"
305tempfile = "3.20.0"
306text = { path = "crates/text" }
307theme = { path = "crates/theme" }
308thiserror = "2.0.12"
309time = { version = "0.3", features = [
310    "macros",
311    "parsing",
312    "serde",
313    "serde-well-known",
314    "formatting",
315    "local-offset",
316] }
317tokio = { version = "1" }
318tracing = "0.1.40"
319tree-sitter = { version = "0.26", features = ["wasm"] }
320tree-sitter-json = "0.24"
321unicase = "2.6"
322unicode-segmentation = "1.10"
323unindent = "0.2.0"
324url = "2.2"
325urlencoding = "2.1.2"
326util = { path = "crates/util" }
327util_macros = { path = "crates/util_macros" }
328uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
329walkdir = "2.5"
330which = "6.0.0"
331windows-core = "0.61"
332zeroize = "1.8"
333zlog = { path = "crates/zlog" }
334ztracing = { path = "crates/ztracing" }
335ztracing_macro = { path = "crates/ztracing_macro" }