Workspace Organization
Glass uses a Cargo workspace with 200+ member crates organized into functional groups:Major Crate Categories
Application & Entry Points
- Main Application
- UI Framework
zed - Main application binary
- Entry point:
src/main.rs - Coordinates all major subsystems
- Platform-specific initialization
- 200+ dependencies
- Remote development tools
- Extension management
Editor & Text
Core Text Crates
| Crate | Purpose |
|---|---|
| editor | Main editor implementation |
| text | Text buffer data structure |
| rope | Persistent rope for efficient editing |
| multi_buffer | Multiple buffer management |
| buffer_diff | Diff computation |
| syntax | Syntax highlighting via Tree-sitter |
Language Support
Project Management
Project management crates handle file systems, Git integration, and project-wide operations.
- File watching and indexing
- LSP server lifecycle
- Symbol search
- Diagnostics aggregation
- Directory watching
- File tree structure
- Git status integration
- Async I/O
- Platform differences
- Virtual file systems for testing
- Status tracking
- Blame information
- Repository operations
Collaboration & Networking
client - Collaboration client- Connection management
- User presence
- Channel communication
- Message routing
- Peer-to-peer connections
- Protocol buffer schemas
- Generated Rust code
- SSH connection management
- Remote file system access
AI & Language Models
Core AI Crates
agent - AI agent coordination agent_ui - Agent panel interface agent_settings - Agent configuration language_model - LLM provider abstraction language_models - Provider implementationsLLM Provider Integrations
- anthropic - Claude integration
- open_ai - OpenAI/GPT integration
- google_ai - Gemini integration
- ollama - Local Ollama models
- bedrock - AWS Bedrock
- deepseek - DeepSeek models
- mistral - Mistral AI
- x_ai - xAI/Grok
- open_router - OpenRouter proxy
Code Intelligence
copilot - GitHub Copilot integration copilot_chat - Copilot chat interface supermaven - Supermaven completion edit_prediction - AI-powered predictions edit_prediction_ui - Prediction UIUI Components & Panels
Editor UI
Workspace UI
Tool Panels
| Crate | Description |
|---|---|
| search | Project-wide search |
| diagnostics | Error/warning panel |
| terminal_view | Integrated terminal |
| git_ui | Git panel |
| git_graph | Git history visualization |
| debugger_ui | Debugger interface |
| tasks_ui | Task runner UI |
Debugging & Development
dap - Debug Adapter Protocol client dap_adapters - DAP adapter implementations debug_adapter_extension - Extension API for debuggers debugger_tools - Debugging utilities debugger_ui - Debug panel UIExtension System
- Runtime
- Types
extension - Extension loading
extension_host - WASM runtime (Wasmtime)
extension_api - WASM interface
extensions_ui - Extension marketplace UI
Utilities & Infrastructure
Core Utilities
Settings & Configuration
Data & Persistence
Telemetry & Logging
Platform-Specific
Platform Abstractions- native_platforms - Platform detection
- native_platforms_ui - Platform UI integration
- etw_tracing - Windows ETW tracing
- audio - Audio playback
- crashes - Crash reporting
- auto_update - Auto-update system
- install_cli - CLI installation
Specialized Features
Document Viewers
- markdown_preview - Markdown rendering
- svg_preview - SVG viewer
- image_viewer - Image viewer
- browser - Embedded browser
Developer Tools
- repl - REPL integration (Jupyter)
- component_preview - Component preview
- inspector_ui - UI inspector
- miniprofiler_ui - Performance profiler
Search & Navigation
Dependency Management
Workspace Dependencies
All dependencies are declared once in the rootCargo.toml:
Key External Dependencies
| Dependency | Purpose |
|---|---|
| tree-sitter | Syntax parsing |
| lsp-types | LSP protocol |
| tokio | Async runtime |
| serde | Serialization |
| wgpu | GPU rendering |
| wasmtime | WASM runtime |
Crate Dependency Graph
Core Dependencies
Build Configuration
Edition & License
Optimization Settings
See Build System for details on:- Release profiles
- Proc-macro optimization
- Codegen units
- LTO settings
Testing Support
Many crates provide test-support features:- Mock implementations
- Test utilities
- Deterministic behavior
Related Pages
- Architecture Overview - System design
- GPUI Framework - UI framework details
- Build System - Compilation configuration