[workspace]
resolver = "2"
members = [
    # Top-level runner (thin wrapper)
    "apps/bin",

    # Server layer
    "server/lib/kernel",
    "server/lib/server",

    # Server drivers
    "server/lib/drivers/command-types",
    "server/lib/drivers/command",
    "server/lib/drivers/input",
    "server/lib/drivers/syntax",
    "server/lib/drivers/syntax-treesitter",
    "server/lib/drivers/lsp",
    "server/lib/drivers/vfs",
    "server/lib/drivers/session",
    "server/lib/drivers/undo",
    "server/lib/drivers/buffer",
    "server/lib/drivers/search",
    "server/lib/drivers/clipboard",
    "server/lib/drivers/formatter",
    "server/lib/drivers/ffi",
    "server/lib/drivers/ffi-python",
    "server/lib/drivers/picker",
    "server/lib/drivers/completion",
    "shared/depgraph",
    "server/lib/drivers/manifest",
    "server/lib/drivers/module-config",
    "server/lib/drivers/module-loader",
    "server/lib/drivers/git",
    "server/lib/drivers/module-registry",
    "server/lib/drivers/layout",
    "server/lib/drivers/annotation",
    "server/lib/drivers/statusline",
    "server/lib/drivers/codec",

    # Server modules
    "server/modules/vim",
    "server/modules/editor",
    "server/modules/motions",
    "server/modules/textobjects",
    "server/modules/commands",
    "server/modules/keymap",
    "server/modules/layout",
    "server/modules/mode-manager",
    "server/modules/buffer-ops",
    "server/modules/buffer-simple",
    "server/modules/scratch-buffer",
    "server/modules/clipboard",
    "server/modules/search",
    "server/modules/undo",
    "server/modules/vfs-local",
    "server/modules/window-ops",
    "server/modules/treesitter-rust",
    "server/modules/treesitter-python",
    "server/modules/treesitter-c",
    "server/modules/treesitter-javascript",
    "server/modules/treesitter-typescript",
    "server/modules/treesitter-json",
    "server/modules/treesitter-toml",
    "server/modules/treesitter-bash",
    "server/modules/treesitter-go",
    "server/modules/cmdline",
    "server/modules/whichkey",
    "server/modules/notification",
    "server/modules/microscope",
    "server/modules/explorer",
    "server/modules/picker-files",
    "server/modules/picker-buffers",
    "server/modules/picker-commands",
    "server/modules/picker-grep",
    "server/modules/picker-options",
    "server/modules/treesitter-markdown",
    "server/modules/lsp",
    "server/modules/snippet",
    "server/modules/range-finder",
    "server/modules/completion",
    "server/modules/lsp-navigation",
    "server/modules/profiles",
    "server/modules/tetromino",
    "server/modules/health-check",
    "server/modules/git",
    "server/modules/picker-git-branches",
    "server/modules/picker-git-log",
    "server/modules/picker-git-status",
    "server/modules/picker-git-stash",
    "server/modules/git-signs",
    "server/modules/git-statusline",
    "server/modules/illuminate",
    "server/modules/format",
    "server/modules/diagnostics-panel",
    "server/modules/bufferline",
    "server/modules/git-blame",
    "server/modules/module-manager",
    "server/modules/emacs",
    "server/modules/pair",
    "server/modules/context",
    "server/modules/sticky-context",
    "server/modules/indent-guide",
    "server/modules/settings",
    "server/modules/codec-utf8",
    "server/modules/codec-hex",
    "server/modules/codec-cjk",
    "server/modules/codec-legacy",
    "server/modules/codec-pdf",
    "server/modules/codec-binary-struct",
    "server/modules/codec-csv",

    # Client layer - TUI
    "clients/tui",
    "clients/tui/lib/drivers/tui",
    "clients/tui/lib/drivers/display",
    # Client modules - TUI (native ClientModule implementations)
    "clients/tui/modules/statusline",
    "clients/tui/modules/hover",
    "clients/tui/modules/signature-help",
    "clients/tui/modules/landing",
    "clients/tui/modules/completion",
    "clients/tui/modules/notification",
    "clients/tui/modules/which-key",
    "clients/tui/modules/cmdline",
    "clients/tui/modules/microscope",
    "clients/tui/modules/explorer",
    "clients/tui/modules/tetromino",
    "clients/tui/modules/line-numbers",
    "clients/tui/modules/fold",
    "clients/tui/modules/jump",
    "clients/tui/modules/pair",
    "clients/tui/modules/yank-flash",
    "clients/tui/modules/illuminate",
    "clients/tui/modules/diagnostics",
    "clients/tui/modules/markdown",
    "clients/tui/modules/bufferline",

    # Client layer - CLI
    "clients/cli",

    # Shared layer
    "shared/protocol",
    "shared/arch",
    "shared/net",
    "shared/log",
    "shared/trace",
    "shared/module-macros",
    "shared/capabilities",
    "shared/testing",

    # Shared clients layer
    "shared/clients/model",
    "shared/clients/driver",

    # Shared benchmarking utilities
    "shared/bench",

    # Tools (Rust only - reovim-testing is Python)
    "tools/bench",
    "tools/perf-report",

    # Test fixtures (cdylib modules for integration testing)
    "server/lib/drivers/module-loader/tests/fixtures/test_module",
]
exclude = [
    # Python projects (not Rust)
    "tools/reovim-testing",
]
default-members = ["apps/bin"]

[workspace.package]
rust-version = "1.92"
version = "0.14.4"
edition = "2024"
authors = ["ds1sqe(dukim) <ds1sqe@mensakorea.org>"]
license = "AGPL-3.0-only"
description = "A Rust-powered neovim-like text editor"
repository = "https://github.com/ds1sqe/reovim"
homepage = "https://github.com/ds1sqe/reovim"
readme = "README.md"
keywords = ["vim", "vi", "neovim", "editor", "terminal"]
categories = ["text-editors", "command-line-utilities"]

[workspace.metadata.workspaces]
allow_branch = "develop"

[workspace.metadata.docs.rs]
rustdoc-args = ["--document-private-items"]

[workspace.lints.rust]
warnings = "deny"
unsafe_code = "warn"
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(coverage_nightly)'] }

[workspace.lints.clippy]
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }

[workspace.dependencies]
bitflags = "2.6.0"
parking_lot = "0.12.3"
futures = "0.3"
futures-timer = "3.0"
rand = "0.8"
regex = "1"

tokio = { version = "1.25", features = ["full"] }
notify = "6.1"
tonic = "0.12"
rustix = { version="0.38.42", features = ["std", "stdio", "termios"]}
crossterm = {version="0.29", features = ["event-stream","filedescriptor"]}

# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt", "time"] }
tracing-appender = "0.2"
chrono = "0.4"

# Shared crates
reovim-arch = { path = "./shared/arch", version = "0.14.4" }
reovim-protocol = { path = "./shared/protocol", version = "0.14.4" }
reovim-module-macros = { path = "./shared/module-macros", version = "0.14.4" }
reovim-capabilities = { path = "./shared/capabilities", version = "0.14.4" }
reovim-testing = { path = "./shared/testing", version = "0.14.4" }
reovim-bench-utils = { path = "./shared/bench", version = "0.14.4" }
reovim-net = { path = "./shared/net", version = "0.14.4" }
reovim-log = { path = "./shared/log", version = "0.14.4" }
reovim-trace = { path = "./shared/trace", version = "0.14.4" }

# Server crates
reovim-kernel = { path = "./server/lib/kernel", version = "0.14.4" }
reovim-server = { path = "./server/lib/server", version = "0.14.4" }

# Server drivers
reovim-driver-command-types = { path = "./server/lib/drivers/command-types", version = "0.14.4" }
reovim-driver-command = { path = "./server/lib/drivers/command", version = "0.14.4" }
reovim-driver-input = { path = "./server/lib/drivers/input", version = "0.14.4" }
reovim-driver-syntax = { path = "./server/lib/drivers/syntax", version = "0.14.4" }
reovim-driver-syntax-treesitter = { path = "./server/lib/drivers/syntax-treesitter", version = "0.14.4" }
reovim-driver-lsp = { path = "./server/lib/drivers/lsp", version = "0.14.4" }
reovim-driver-vfs = { path = "./server/lib/drivers/vfs", version = "0.14.4" }
reovim-driver-session = { path = "./server/lib/drivers/session", version = "0.14.4" }
reovim-driver-undo = { path = "./server/lib/drivers/undo", version = "0.14.4" }
reovim-driver-buffer = { path = "./server/lib/drivers/buffer", version = "0.14.4" }
reovim-driver-search = { path = "./server/lib/drivers/search", version = "0.14.4" }
reovim-driver-clipboard = { path = "./server/lib/drivers/clipboard", version = "0.14.4" }
reovim-driver-formatter = { path = "./server/lib/drivers/formatter", version = "0.14.4" }
reovim-driver-ffi = { path = "./server/lib/drivers/ffi", version = "0.14.4" }
reovim-driver-ffi-python = { path = "./server/lib/drivers/ffi-python", version = "0.14.4" }
reovim-driver-picker = { path = "./server/lib/drivers/picker", version = "0.14.4" }
reovim-driver-completion = { path = "./server/lib/drivers/completion", version = "0.14.4" }
reovim-depgraph = { path = "./shared/depgraph", version = "0.14.4" }
reovim-driver-manifest = { path = "./server/lib/drivers/manifest", version = "0.14.4" }
reovim-driver-module-config = { path = "./server/lib/drivers/module-config", version = "0.14.4" }
reovim-driver-module-loader = { path = "./server/lib/drivers/module-loader", version = "0.14.4" }
reovim-driver-git = { path = "./server/lib/drivers/git", version = "0.14.4" }
reovim-driver-module-registry = { path = "./server/lib/drivers/module-registry", version = "0.14.4" }
reovim-driver-layout = { path = "./server/lib/drivers/layout", version = "0.14.4" }
reovim-driver-annotation = { path = "./server/lib/drivers/annotation", version = "0.14.4" }
reovim-driver-statusline = { path = "./server/lib/drivers/statusline", version = "0.14.4" }
reovim-driver-codec = { path = "./server/lib/drivers/codec", version = "0.14.4" }

# Client drivers (TUI-specific)
reovim-driver-tui = { path = "./clients/tui/lib/drivers/tui", version = "0.14.4" }
reovim-driver-display = { path = "./clients/tui/lib/drivers/display", version = "0.14.4" }

# Client crates
reovim-client-tui = { path = "./clients/tui", version = "0.14.4" }
reovim-client-cli = { path = "./clients/cli", version = "0.14.4" }

# Common client model (platform-agnostic abstractions)
reovim-client-model = { path = "./shared/clients/model", version = "0.14.4" }

# Client driver contracts (CLM traits and types)
reovim-client-driver = { path = "./shared/clients/driver", version = "0.14.4" }

# Application binary
reovim-app = { path = "./apps/bin", version = "0.14.4" }

# Python FFI
pyo3 = { version = "0.27", features = ["auto-initialize"] }

# Server modules
reovim-module-vim = { path = "./server/modules/vim", version = "0.14.4" }
reovim-module-editor = { path = "./server/modules/editor", version = "0.14.4" }
reovim-module-motions = { path = "./server/modules/motions", version = "0.14.4" }
reovim-module-textobjects = { path = "./server/modules/textobjects", version = "0.14.4" }
reovim-module-commands = { path = "./server/modules/commands", version = "0.14.4" }
reovim-module-keymap = { path = "./server/modules/keymap", version = "0.14.4" }
reovim-module-layout = { path = "./server/modules/layout", version = "0.14.4" }
reovim-module-mode-manager = { path = "./server/modules/mode-manager", version = "0.14.4" }
reovim-module-buffer-ops = { path = "./server/modules/buffer-ops", version = "0.14.4" }
reovim-module-buffer-simple = { path = "./server/modules/buffer-simple", version = "0.14.4" }
reovim-module-scratch-buffer = { path = "./server/modules/scratch-buffer", version = "0.14.4" }
reovim-module-clipboard = { path = "./server/modules/clipboard", version = "0.14.4" }
reovim-module-search = { path = "./server/modules/search", version = "0.14.4" }
reovim-module-undo = { path = "./server/modules/undo", version = "0.14.4" }
reovim-module-vfs-local = { path = "./server/modules/vfs-local", version = "0.14.4" }
reovim-module-window-ops = { path = "./server/modules/window-ops", version = "0.14.4" }
reovim-module-treesitter-rust = { path = "./server/modules/treesitter-rust", version = "0.14.4" }
reovim-module-treesitter-python = { path = "./server/modules/treesitter-python", version = "0.14.4" }
reovim-module-treesitter-c = { path = "./server/modules/treesitter-c", version = "0.14.4" }
reovim-module-treesitter-javascript = { path = "./server/modules/treesitter-javascript", version = "0.14.4" }
reovim-module-treesitter-typescript = { path = "./server/modules/treesitter-typescript", version = "0.14.4" }
reovim-module-treesitter-json = { path = "./server/modules/treesitter-json", version = "0.14.4" }
reovim-module-treesitter-toml = { path = "./server/modules/treesitter-toml", version = "0.14.4" }
reovim-module-treesitter-bash = { path = "./server/modules/treesitter-bash", version = "0.14.4" }
reovim-module-treesitter-go = { path = "./server/modules/treesitter-go", version = "0.14.4" }
reovim-module-cmdline = { path = "./server/modules/cmdline", version = "0.14.4" }
reovim-module-whichkey = { path = "./server/modules/whichkey", version = "0.14.4" }
reovim-module-notification = { path = "./server/modules/notification", version = "0.14.4" }
reovim-module-microscope = { path = "./server/modules/microscope", version = "0.14.4" }
reovim-module-explorer = { path = "./server/modules/explorer", version = "0.14.4" }
reovim-picker-files = { path = "./server/modules/picker-files", version = "0.14.4" }
reovim-picker-buffers = { path = "./server/modules/picker-buffers", version = "0.14.4" }
reovim-picker-commands = { path = "./server/modules/picker-commands", version = "0.14.4" }
reovim-picker-grep = { path = "./server/modules/picker-grep", version = "0.14.4" }
reovim-picker-options = { path = "./server/modules/picker-options", version = "0.14.4" }
reovim-module-treesitter-markdown = { path = "./server/modules/treesitter-markdown", version = "0.14.4" }
reovim-module-lsp = { path = "./server/modules/lsp", version = "0.14.4" }
reovim-module-snippet = { path = "./server/modules/snippet", version = "0.14.4" }
reovim-module-range-finder = { path = "./server/modules/range-finder", version = "0.14.4" }
reovim-module-completion = { path = "./server/modules/completion", version = "0.14.4" }
reovim-module-lsp-navigation = { path = "./server/modules/lsp-navigation", version = "0.14.4" }
reovim-module-profiles = { path = "./server/modules/profiles", version = "0.14.4" }
reovim-module-tetromino = { path = "./server/modules/tetromino", version = "0.14.4" }
reovim-module-health-check = { path = "./server/modules/health-check", version = "0.14.4" }
reovim-module-git = { path = "./server/modules/git", version = "0.14.4" }
reovim-picker-git-branches = { path = "./server/modules/picker-git-branches", version = "0.14.4" }
reovim-picker-git-log = { path = "./server/modules/picker-git-log", version = "0.14.4" }
reovim-picker-git-status = { path = "./server/modules/picker-git-status", version = "0.14.4" }
reovim-picker-git-stash = { path = "./server/modules/picker-git-stash", version = "0.14.4" }
reovim-module-git-signs = { path = "./server/modules/git-signs", version = "0.14.4" }
reovim-module-git-statusline = { path = "./server/modules/git-statusline", version = "0.14.4" }
reovim-module-illuminate = { path = "./server/modules/illuminate", version = "0.14.4" }
reovim-module-format = { path = "./server/modules/format", version = "0.14.4" }
reovim-module-diagnostics-panel = { path = "./server/modules/diagnostics-panel", version = "0.14.4" }
reovim-module-bufferline = { path = "./server/modules/bufferline", version = "0.14.4" }
reovim-module-git-blame = { path = "./server/modules/git-blame", version = "0.14.4" }
reovim-module-module-manager = { path = "./server/modules/module-manager", version = "0.14.4" }
reovim-module-emacs = { path = "./server/modules/emacs", version = "0.14.4" }
reovim-module-pair = { path = "./server/modules/pair", version = "0.14.4" }
reovim-module-context = { path = "./server/modules/context", version = "0.14.4" }
reovim-module-sticky-context = { path = "./server/modules/sticky-context", version = "0.14.4" }
reovim-module-indent-guide = { path = "./server/modules/indent-guide", version = "0.14.4" }
reovim-module-settings = { path = "./server/modules/settings", version = "0.14.4" }
reovim-module-codec-utf8 = { path = "./server/modules/codec-utf8", version = "0.14.4" }
reovim-module-codec-hex = { path = "./server/modules/codec-hex", version = "0.14.4" }
reovim-module-codec-cjk = { path = "./server/modules/codec-cjk", version = "0.14.4" }
reovim-module-codec-legacy = { path = "./server/modules/codec-legacy", version = "0.14.4" }
reovim-module-codec-pdf = { path = "./server/modules/codec-pdf", version = "0.14.4" }
reovim-module-codec-binary-struct = { path = "./server/modules/codec-binary-struct", version = "0.14.4" }
reovim-module-codec-csv = { path = "./server/modules/codec-csv", version = "0.14.4" }

# Client modules - TUI (native ClientModule implementations)
reovim-tui-mod-statusline = { path = "./clients/tui/modules/statusline", version = "0.14.4" }
reovim-tui-mod-hover = { path = "./clients/tui/modules/hover", version = "0.14.4" }
reovim-tui-mod-signature-help = { path = "./clients/tui/modules/signature-help", version = "0.14.4" }
reovim-tui-mod-landing = { path = "./clients/tui/modules/landing", version = "0.14.4" }
reovim-tui-mod-completion = { path = "./clients/tui/modules/completion", version = "0.14.4" }
reovim-tui-mod-notification = { path = "./clients/tui/modules/notification", version = "0.14.4" }
reovim-tui-mod-whichkey = { path = "./clients/tui/modules/which-key", version = "0.14.4" }
reovim-tui-mod-cmdline = { path = "./clients/tui/modules/cmdline", version = "0.14.4" }
reovim-tui-mod-microscope = { path = "./clients/tui/modules/microscope", version = "0.14.4" }
reovim-tui-mod-explorer = { path = "./clients/tui/modules/explorer", version = "0.14.4" }
reovim-tui-mod-tetromino = { path = "./clients/tui/modules/tetromino", version = "0.14.4" }
reovim-tui-mod-line-numbers = { path = "./clients/tui/modules/line-numbers", version = "0.14.4" }
reovim-tui-mod-fold = { path = "./clients/tui/modules/fold", version = "0.14.4" }
reovim-tui-mod-jump = { path = "./clients/tui/modules/jump", version = "0.14.4" }
reovim-tui-mod-pair = { path = "./clients/tui/modules/pair", version = "0.14.4" }
reovim-tui-mod-yank-flash = { path = "./clients/tui/modules/yank-flash", version = "0.14.4" }
reovim-tui-mod-illuminate = { path = "./clients/tui/modules/illuminate", version = "0.14.4" }
reovim-tui-mod-diagnostics = { path = "./clients/tui/modules/diagnostics", version = "0.14.4" }
reovim-tui-mod-markdown = { path = "./clients/tui/modules/markdown", version = "0.14.4" }
reovim-tui-mod-bufferline = { path = "./clients/tui/modules/bufferline", version = "0.14.4" }

# CLI
clap = { version = "4", features = ["derive"] }

# Configuration
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"

# Clipboard
arboard = "3"

# Dynamic module loading
libloading = "0.8"
sha2 = "0.10"
hex = "0.4"

# Unicode
unicode-width = "0.2"

# Fuzzy matching
nucleo = "0.5"
ignore = "0.4"

# Encoding support
encoding_rs = "0.8"

# Document format support
pdf-extract = "0.7"

# Binary format parsing
goblin = "0.9"
zip = { version = "8", default-features = false }
csv = "1.3"
