Cargo.toml

  1[workspace]
  2resolver = "2"
  3members = [
  4    "crates/activity_indicator",
  5    "crates/anthropic",
  6    "crates/assets",
  7    "crates/assistant",
  8    "crates/assistant_slash_command",
  9    "crates/assistant_tool",
 10    "crates/audio",
 11    "crates/auto_update",
 12    "crates/breadcrumbs",
 13    "crates/call",
 14    "crates/channel",
 15    "crates/cli",
 16    "crates/client",
 17    "crates/clock",
 18    "crates/collab",
 19    "crates/collab_ui",
 20    "crates/collections",
 21    "crates/command_palette",
 22    "crates/command_palette_hooks",
 23    "crates/context_servers",
 24    "crates/copilot",
 25    "crates/db",
 26    "crates/dev_server_projects",
 27    "crates/diagnostics",
 28    "crates/docs_preprocessor",
 29    "crates/editor",
 30    "crates/extension",
 31    "crates/extension_api",
 32    "crates/extension_cli",
 33    "crates/extensions_ui",
 34    "crates/feature_flags",
 35    "crates/feedback",
 36    "crates/file_finder",
 37    "crates/file_icons",
 38    "crates/fs",
 39    "crates/fsevent",
 40    "crates/fuzzy",
 41    "crates/git",
 42    "crates/git_hosting_providers",
 43    "crates/go_to_line",
 44    "crates/google_ai",
 45    "crates/gpui",
 46    "crates/gpui_macros",
 47    "crates/headless",
 48    "crates/html_to_markdown",
 49    "crates/http_client",
 50    "crates/image_viewer",
 51    "crates/indexed_docs",
 52    "crates/inline_completion_button",
 53    "crates/install_cli",
 54    "crates/journal",
 55    "crates/language",
 56    "crates/language_model",
 57    "crates/language_selector",
 58    "crates/language_tools",
 59    "crates/languages",
 60    "crates/live_kit_client",
 61    "crates/live_kit_server",
 62    "crates/lsp",
 63    "crates/markdown",
 64    "crates/markdown_preview",
 65    "crates/media",
 66    "crates/menu",
 67    "crates/multi_buffer",
 68    "crates/node_runtime",
 69    "crates/notifications",
 70    "crates/ollama",
 71    "crates/open_ai",
 72    "crates/outline",
 73    "crates/outline_panel",
 74    "crates/paths",
 75    "crates/picker",
 76    "crates/prettier",
 77    "crates/project",
 78    "crates/project_panel",
 79    "crates/project_symbols",
 80    "crates/proto",
 81    "crates/quick_action_bar",
 82    "crates/recent_projects",
 83    "crates/refineable",
 84    "crates/refineable/derive_refineable",
 85    "crates/release_channel",
 86    "crates/remote",
 87    "crates/remote_server",
 88    "crates/repl",
 89    "crates/rich_text",
 90    "crates/rope",
 91    "crates/rpc",
 92    "crates/search",
 93    "crates/semantic_index",
 94    "crates/semantic_version",
 95    "crates/session",
 96    "crates/settings",
 97    "crates/settings_ui",
 98    "crates/snippet",
 99    "crates/snippet_provider",
100    "crates/sqlez",
101    "crates/sqlez_macros",
102    "crates/story",
103    "crates/storybook",
104    "crates/sum_tree",
105    "crates/supermaven",
106    "crates/supermaven_api",
107    "crates/tab_switcher",
108    "crates/task",
109    "crates/tasks_ui",
110    "crates/telemetry_events",
111    "crates/terminal",
112    "crates/terminal_view",
113    "crates/text",
114    "crates/theme",
115    "crates/theme_importer",
116    "crates/theme_selector",
117    "crates/time_format",
118    "crates/title_bar",
119    "crates/ui",
120    "crates/ui_input",
121    "crates/ui_macros",
122    "crates/util",
123    "crates/vcs_menu",
124    "crates/vim",
125    "crates/welcome",
126    "crates/workspace",
127    "crates/worktree",
128    "crates/zed",
129    "crates/zed_actions",
130
131    #
132    # Extensions
133    #
134
135    "extensions/astro",
136    "extensions/clojure",
137    "extensions/csharp",
138    "extensions/dart",
139    "extensions/deno",
140    "extensions/elixir",
141    "extensions/elm",
142    "extensions/emmet",
143    "extensions/erlang",
144    "extensions/gleam",
145    "extensions/glsl",
146    "extensions/haskell",
147    "extensions/html",
148    "extensions/lua",
149    "extensions/ocaml",
150    "extensions/php",
151    "extensions/perplexity",
152    "extensions/prisma",
153    "extensions/purescript",
154    "extensions/ruff",
155    "extensions/ruby",
156    "extensions/slash-commands-example",
157    "extensions/snippets",
158    "extensions/svelte",
159    "extensions/terraform",
160    "extensions/test-extension",
161    "extensions/toml",
162    "extensions/uiua",
163    "extensions/vue",
164    "extensions/zig",
165
166    #
167    # Tooling
168    #
169
170    "tooling/xtask",
171]
172default-members = ["crates/zed"]
173
174[workspace.dependencies]
175#
176# Workspace member crates
177#
178
179activity_indicator = { path = "crates/activity_indicator" }
180ai = { path = "crates/ai" }
181anthropic = { path = "crates/anthropic" }
182assets = { path = "crates/assets" }
183assistant = { path = "crates/assistant" }
184assistant_slash_command = { path = "crates/assistant_slash_command" }
185assistant_tool = { path = "crates/assistant_tool" }
186audio = { path = "crates/audio" }
187auto_update = { path = "crates/auto_update" }
188breadcrumbs = { path = "crates/breadcrumbs" }
189call = { path = "crates/call" }
190channel = { path = "crates/channel" }
191cli = { path = "crates/cli" }
192client = { path = "crates/client" }
193clock = { path = "crates/clock" }
194collab = { path = "crates/collab" }
195collab_ui = { path = "crates/collab_ui" }
196collections = { path = "crates/collections" }
197command_palette = { path = "crates/command_palette" }
198command_palette_hooks = { path = "crates/command_palette_hooks" }
199context_servers = { path = "crates/context_servers" }
200copilot = { path = "crates/copilot" }
201db = { path = "crates/db" }
202dev_server_projects = { path = "crates/dev_server_projects" }
203diagnostics = { path = "crates/diagnostics" }
204editor = { path = "crates/editor" }
205extension = { path = "crates/extension" }
206extensions_ui = { path = "crates/extensions_ui" }
207feature_flags = { path = "crates/feature_flags" }
208feedback = { path = "crates/feedback" }
209file_finder = { path = "crates/file_finder" }
210file_icons = { path = "crates/file_icons" }
211fs = { path = "crates/fs" }
212fsevent = { path = "crates/fsevent" }
213fuzzy = { path = "crates/fuzzy" }
214git = { path = "crates/git" }
215git_hosting_providers = { path = "crates/git_hosting_providers" }
216go_to_line = { path = "crates/go_to_line" }
217google_ai = { path = "crates/google_ai" }
218gpui = { path = "crates/gpui" }
219gpui_macros = { path = "crates/gpui_macros" }
220handlebars = "4.3"
221headless = { path = "crates/headless" }
222html_to_markdown = { path = "crates/html_to_markdown" }
223http_client = { path = "crates/http_client" }
224image_viewer = { path = "crates/image_viewer" }
225indexed_docs = { path = "crates/indexed_docs" }
226inline_completion_button = { path = "crates/inline_completion_button" }
227install_cli = { path = "crates/install_cli" }
228journal = { path = "crates/journal" }
229language = { path = "crates/language" }
230language_model = { path = "crates/language_model" }
231language_selector = { path = "crates/language_selector" }
232language_tools = { path = "crates/language_tools" }
233languages = { path = "crates/languages" }
234live_kit_client = { path = "crates/live_kit_client" }
235live_kit_server = { path = "crates/live_kit_server" }
236lsp = { path = "crates/lsp" }
237markdown = { path = "crates/markdown" }
238markdown_preview = { path = "crates/markdown_preview" }
239media = { path = "crates/media" }
240menu = { path = "crates/menu" }
241multi_buffer = { path = "crates/multi_buffer" }
242node_runtime = { path = "crates/node_runtime" }
243notifications = { path = "crates/notifications" }
244ollama = { path = "crates/ollama" }
245open_ai = { path = "crates/open_ai" }
246outline = { path = "crates/outline" }
247outline_panel = { path = "crates/outline_panel" }
248paths = { path = "crates/paths" }
249picker = { path = "crates/picker" }
250plugin = { path = "crates/plugin" }
251plugin_macros = { path = "crates/plugin_macros" }
252prettier = { path = "crates/prettier" }
253project = { path = "crates/project" }
254project_panel = { path = "crates/project_panel" }
255project_symbols = { path = "crates/project_symbols" }
256proto = { path = "crates/proto" }
257quick_action_bar = { path = "crates/quick_action_bar" }
258recent_projects = { path = "crates/recent_projects" }
259refineable = { path = "crates/refineable" }
260release_channel = { path = "crates/release_channel" }
261remote = { path = "crates/remote" }
262remote_server = { path = "crates/remote_server" }
263repl = { path = "crates/repl" }
264rich_text = { path = "crates/rich_text" }
265rope = { path = "crates/rope" }
266rpc = { path = "crates/rpc" }
267search = { path = "crates/search" }
268semantic_index = { path = "crates/semantic_index" }
269semantic_version = { path = "crates/semantic_version" }
270session = { path = "crates/session" }
271settings = { path = "crates/settings" }
272settings_ui = { path = "crates/settings_ui" }
273snippet = { path = "crates/snippet" }
274snippet_provider = { path = "crates/snippet_provider" }
275sqlez = { path = "crates/sqlez" }
276sqlez_macros = { path = "crates/sqlez_macros" }
277story = { path = "crates/story" }
278storybook = { path = "crates/storybook" }
279sum_tree = { path = "crates/sum_tree" }
280supermaven = { path = "crates/supermaven" }
281supermaven_api = { path = "crates/supermaven_api" }
282tab_switcher = { path = "crates/tab_switcher" }
283task = { path = "crates/task" }
284tasks_ui = { path = "crates/tasks_ui" }
285telemetry_events = { path = "crates/telemetry_events" }
286terminal = { path = "crates/terminal" }
287terminal_view = { path = "crates/terminal_view" }
288text = { path = "crates/text" }
289theme = { path = "crates/theme" }
290theme_importer = { path = "crates/theme_importer" }
291theme_selector = { path = "crates/theme_selector" }
292time_format = { path = "crates/time_format" }
293title_bar = { path = "crates/title_bar" }
294ui = { path = "crates/ui" }
295ui_input = { path = "crates/ui_input" }
296ui_macros = { path = "crates/ui_macros" }
297util = { path = "crates/util" }
298vcs_menu = { path = "crates/vcs_menu" }
299vim = { path = "crates/vim" }
300welcome = { path = "crates/welcome" }
301workspace = { path = "crates/workspace" }
302worktree = { path = "crates/worktree" }
303zed = { path = "crates/zed" }
304zed_actions = { path = "crates/zed_actions" }
305
306#
307# External crates
308#
309
310aho-corasick = "1.1"
311alacritty_terminal = { git = "https://github.com/alacritty/alacritty", rev = "91d034ff8b53867143c005acfaa14609147c9a2c" }
312any_vec = "0.14"
313anyhow = "1.0.86"
314arrayvec = { version = "0.7.4", features = ["serde"] }
315ashpd = "0.9.1"
316async-compression = { version = "0.4", features = ["gzip", "futures-io"] }
317async-dispatcher = "0.1"
318async-fs = "1.6"
319async-pipe = { git = "https://github.com/zed-industries/async-pipe-rs", rev = "82d00a04211cf4e1236029aa03e6b6ce2a74c553" }
320async-recursion = "1.0.0"
321async-tar = "0.5.0"
322async-trait = "0.1"
323async-tungstenite = "0.23"
324async-watch = "0.3.1"
325async_zip = { version = "0.0.17", features = ["deflate", "deflate64"] }
326base64 = "0.22"
327bitflags = "2.6.0"
328blade-graphics = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
329blade-macros = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
330blade-util = { git = "https://github.com/kvark/blade", rev = "e142a3a5e678eb6a13e642ad8401b1f3aa38e969" }
331blake3 = "1.5.3"
332cargo_metadata = "0.18"
333cargo_toml = "0.20"
334chrono = { version = "0.4", features = ["serde"] }
335clap = { version = "4.4", features = ["derive"] }
336clickhouse = "0.11.6"
337cocoa = "0.26"
338convert_case = "0.6.0"
339core-foundation = "0.9.3"
340core-foundation-sys = "0.8.6"
341ctor = "0.2.6"
342dashmap = "6.0"
343derive_more = "0.99.17"
344dirs = "4.0"
345emojis = "0.6.1"
346env_logger = "0.11"
347exec = "0.3.1"
348fork = "0.2.0"
349futures = "0.3"
350futures-batch = "0.6.1"
351futures-lite = "1.13"
352git2 = { version = "0.19", default-features = false }
353globset = "0.4"
354heed = { version = "0.20.1", features = ["read-txn-no-tls"] }
355hex = "0.4.3"
356hyper = "0.14"
357html5ever = "0.27.0"
358ignore = "0.4.22"
359image = "0.25.1"
360indexmap = { version = "1.6.2", features = ["serde"] }
361indoc = "2"
362# We explicitly disable http2 support in isahc.
363isahc = { version = "1.7.2", default-features = false, features = [
364    "text-decoding",
365] }
366itertools = "0.13.0"
367jsonwebtoken = "9.3"
368libc = "0.2"
369linkify = "0.10.0"
370log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] }
371markup5ever_rcdom = "0.3.0"
372nanoid = "0.4"
373nix = "0.29"
374num-format = "0.4.4"
375once_cell = "1.19.0"
376ordered-float = "2.1.1"
377palette = { version = "0.7.5", default-features = false, features = ["std"] }
378parking_lot = "0.12.1"
379pathdiff = "0.2"
380profiling = "1"
381postage = { version = "0.5", features = ["futures-traits"] }
382pretty_assertions = "1.3.0"
383prost = "0.9"
384prost-build = "0.9"
385prost-types = "0.9"
386pulldown-cmark = { version = "0.12.0", default-features = false }
387rand = "0.8.5"
388regex = "1.5"
389repair_json = "0.1.0"
390rsa = "0.9.6"
391runtimelib = { version = "0.15", default-features = false, features = [
392    "async-dispatcher-runtime",
393] }
394rustc-demangle = "0.1.23"
395rust-embed = { version = "8.4", features = ["include-exclude"] }
396schemars = { version = "0.8", features = ["impl_json_schema"] }
397semver = "1.0"
398serde = { version = "1.0", features = ["derive", "rc"] }
399serde_derive = { version = "1.0", features = ["deserialize_in_place"] }
400serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
401serde_json_lenient = { version = "0.2", features = [
402    "preserve_order",
403    "raw_value",
404] }
405serde_repr = "0.1"
406sha2 = "0.10"
407shellexpand = "2.1.0"
408shlex = "1.3.0"
409signal-hook = "0.3.17"
410similar = "1.3"
411simplelog = "0.12.2"
412smallvec = { version = "1.6", features = ["union"] }
413smol = "1.2"
414strsim = "0.11"
415strum = { version = "0.25.0", features = ["derive"] }
416subtle = "2.5.0"
417sys-locale = "0.3.1"
418sysinfo = "0.30.7"
419tempfile = "3.9.0"
420thiserror = "1.0.29"
421tiktoken-rs = "0.5.9"
422time = { version = "0.3", features = [
423    "macros",
424    "parsing",
425    "serde",
426    "serde-well-known",
427    "formatting",
428] }
429tiny_http = "0.8"
430toml = "0.8"
431tokio = { version = "1", features = ["full"] }
432tower-http = "0.4.4"
433tree-sitter = { version = "0.22", features = ["wasm"] }
434tree-sitter-bash = "0.21"
435tree-sitter-c = "0.21"
436tree-sitter-cpp = "0.22"
437tree-sitter-css = "0.21"
438tree-sitter-elixir = "0.2"
439tree-sitter-embedded-template = "0.20.0"
440tree-sitter-go = "0.21"
441tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod", rev = "1f55029bacd0a6a11f6eb894c4312d429dcf735c", package = "tree-sitter-gomod" }
442tree-sitter-gowork = { git = "https://github.com/d1y/tree-sitter-go-work", rev = "dcbabff454703c3a4bc98a23cf8778d4be46fd22" }
443tree-sitter-heex = { git = "https://github.com/phoenixframework/tree-sitter-heex", rev = "6dd0303acf7138dd2b9b432a229e16539581c701" }
444tree-sitter-html = "0.20"
445tree-sitter-jsdoc = "0.21"
446tree-sitter-json = "0.21"
447tree-sitter-md = { git = "https://github.com/zed-industries/tree-sitter-markdown", rev = "e3855e37f8f2c71aa7513c18a9c95fb7461b1b10" }
448protols-tree-sitter-proto = "0.2"
449tree-sitter-python = "0.21"
450tree-sitter-regex = "0.21"
451tree-sitter-ruby = "0.21"
452tree-sitter-rust = "0.21"
453tree-sitter-typescript = "0.21"
454tree-sitter-yaml = "0.6"
455unindent = "0.1.7"
456unicase = "2.6"
457unicode-segmentation = "1.10"
458url = "2.2"
459uuid = { version = "1.1.2", features = ["v4", "v5", "serde"] }
460wasmparser = "0.201"
461wasm-encoder = "0.201"
462wasmtime = { version = "21.0.1", default-features = false, features = [
463    "async",
464    "demangle",
465    "runtime",
466    "cranelift",
467    "component-model",
468] }
469wasmtime-wasi = "21.0.1"
470which = "6.0.0"
471wit-component = "0.201"
472
473[workspace.dependencies.async-stripe]
474version = "0.39"
475default-features = false
476features = [
477    "runtime-tokio-hyper-rustls",
478    "billing",
479    "checkout",
480    "events",
481    # The features below are only enabled to get the `events` feature to build.
482    "chrono",
483    "connect",
484]
485
486[workspace.dependencies.windows]
487version = "0.58"
488features = [
489    "implement",
490    "Foundation_Numerics",
491    "Storage",
492    "System",
493    "System_Threading",
494    "UI_ViewManagement",
495    "Wdk_System_SystemServices",
496    "Win32_Globalization",
497    "Win32_Graphics_Direct2D",
498    "Win32_Graphics_Direct2D_Common",
499    "Win32_Graphics_DirectWrite",
500    "Win32_Graphics_Dwm",
501    "Win32_Graphics_Dxgi_Common",
502    "Win32_Graphics_Gdi",
503    "Win32_Graphics_Imaging",
504    "Win32_Graphics_Imaging_D2D",
505    "Win32_Security",
506    "Win32_Security_Credentials",
507    "Win32_Storage_FileSystem",
508    "Win32_System_Com",
509    "Win32_System_Com_StructuredStorage",
510    "Win32_System_DataExchange",
511    "Win32_System_LibraryLoader",
512    "Win32_System_Memory",
513    "Win32_System_Ole",
514    "Win32_System_SystemInformation",
515    "Win32_System_SystemServices",
516    "Win32_System_Threading",
517    "Win32_System_WinRT",
518    "Win32_UI_Controls",
519    "Win32_UI_HiDpi",
520    "Win32_UI_Input_Ime",
521    "Win32_UI_Input_KeyboardAndMouse",
522    "Win32_UI_Shell",
523    "Win32_UI_WindowsAndMessaging",
524]
525
526[patch.crates-io]
527# Patch Tree-sitter for updated wasmtime.
528tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "7f4a57817d58a2f134fe863674acad6bbf007228" }
529
530[profile.dev]
531split-debuginfo = "unpacked"
532debug = "limited"
533codegen-units = 16
534
535[profile.dev.package]
536taffy = { opt-level = 3 }
537cranelift-codegen = { opt-level = 3 }
538resvg = { opt-level = 3 }
539rustybuzz = { opt-level = 3 }
540ttf-parser = { opt-level = 3 }
541wasmtime-cranelift = { opt-level = 3 }
542wasmtime = { opt-level = 3 }
543
544[profile.release]
545debug = "limited"
546lto = "thin"
547codegen-units = 1
548
549[profile.release.package]
550zed = { codegen-units = 16 }
551
552[profile.release-fast]
553inherits = "release"
554debug = "full"
555lto = false
556codegen-units = 16
557
558[workspace.lints.clippy]
559dbg_macro = "deny"
560todo = "deny"
561
562# Motivation: We use `vec![a..b]` a lot when dealing with ranges in text, so
563# warning on this rule produces a lot of noise.
564single_range_in_vec_init = "allow"
565
566# These are all of the rules that currently have violations in the Zed
567# codebase.
568#
569# We'll want to drive this list down by either:
570# 1. fixing violations of the rule and begin enforcing it
571# 2. deciding we want to allow the rule permanently, at which point
572#    we should codify that separately above.
573#
574# This list shouldn't be added to; it should only get shorter.
575# =============================================================================
576
577# There are a bunch of rules currently failing in the `style` group, so
578# allow all of those, for now.
579style = { level = "allow", priority = -1 }
580
581# Temporary list of style lints that we've fixed so far.
582module_inception = { level = "deny" }
583question_mark = { level = "deny" }
584redundant_closure = { level = "deny" }
585# Individual rules that have violations in the codebase:
586type_complexity = "allow"
587# We often return trait objects from `new` functions.
588new_ret_no_self = { level = "allow" }
589# We have a few `next` functions that differ in lifetimes
590# compared to Iterator::next. Yet, clippy complains about those.
591should_implement_trait = { level = "allow" }
592
593[workspace.metadata.cargo-machete]
594ignored = ["bindgen", "cbindgen", "prost_build", "serde"]