Skip to content
JeffreyJYZPublic

About

A focused IDE for Rust and C/C++ - CLion parity on the daily loop, built on Tauri 2 and CodeMirror, with clangd, rust-analyzer and an lldb-dap debugger including a hex memory view.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

quarry

A focused IDE for Rust and C/C++ only, built to match CLion on the loop you actually run every day: open a project, navigate it, read the errors, fix them, build, run a test, start the debugger, look at memory.

It does not try to be a general editor. It does not try to match CLion's feature count. The three things a CLion user would miss if they moved — clangd-grade C/C++ insight, rust-analyzer-grade Rust insight, and an LLDB debugger with variables, watchpoints, disassembly and a hex memory view — are exactly what this is built around. Those engines already exist; quarry is the IDE around them.

Status

Most of the daily loop runs end to end for a Cargo project. This is what the app actually does today, read off src-tauri/src/lib.rs and src/:

  • Project and shell: open a folder, detect cargo / CMakeLists.txt / compile_commands.json, report which toolchains were found on PATH or via xcrun, browse a lazily expanded file tree, open files in tabs, save, restore the last project, open tabs and layout (rail, debug panel, git panel, dock tab) on startup via settings::read_settings.

  • Editing: CodeMirror 6 with Rust and C/C++ highlighting, a breakpoint gutter, diagnostics drawn as squiggles plus gutter markers, format on save through rustfmt or clang-format (with a warning when the formatter is unavailable or fails), and format on demand. Rename (lsp_rename) and code actions (lsp_code_actions) are wired through the editor, signature help renders as a tooltip, and inlay hints are rendered in the editor (backend lsp_inlay_hints plus src/editor/inlayHints.ts). Occurrences of the symbol under the caret are highlighted via lsp_document_highlights and src/editor/occurrences.ts. Occurrence selection: Cmd+D selects the word under the caret on first press, then adds the next unselected occurrence each press, wrapping and stopping once all are selected; Cmd+Shift+L selects every occurrence; Cmd+U drops only the last added occurrence. All selected ranges are real editor ranges, so a single edit replaces them all in one undo step. Shortcuts: Cmd+S save, Cmd+Alt+S save all, Cmd+Alt+L format, Cmd+F in-file search, Cmd+Alt+F project search, F12 / Shift+F12 / Cmd+Click for definition and references, Cmd+K for the shortcut sheet.

  • Insight: one LSP server per server kind per project root — rust-analyzer when the root has a Cargo.toml, clangd when it has a compile_commands.json, CMakeLists.txt or a C/C++ source (both run together when both are present) — with full-document sync. Diagnostics stream into the editor and the Problems dock, grouped by file with severity, line and message. The dock's severity counts in the header are toggles that hide or show errors, warnings or info, several at once, all on by default; a "group by file" toggle switches to a flat list ordered by severity, then path, then line, and the choice survives a dock remount through session storage; each row copies as path:line:col severity: message; and the empty state distinguishes no diagnostics from everything filtered out. Hover, go-to-definition, references and completion commands are wired; hover, completion (CompletionList with real labels), definition (LocationLink[]) and references are verified against rust-analyzer 1.99.0 via bun run scripts/lsp-ux-smoke.ts. Document outline via lsp_symbols and src/outline/Outline.tsx.

  • Build: build_project runs cargo build --message-format=json and merges its machine-readable diagnostics into the Problems dock. C/C++ projects without a build system compile through a plain clang build (run_plain_clang_build in src-tauri/src/build_task.rs), so C/C++ builds do not require cmake. The toolbar's Build split control offers Debug and Release (BUILD_PROFILES and buildProfile in src/App.tsx), remembered for the session and passed through to build_project; the debug panel's launch-time build still hardcodes debug.

  • Run: run_program / stop_program stream run://output lines and one run://exited, with a run panel in src/ui/run/ (program, args, cwd, env vars with validation, argv preview, run/stop); an empty cwd runs in the project root, so a saved configuration from before the prefill still runs. Opening a project prefills the form: cargo metadata names the Cargo binary, and a C/C++ project gets its conventional build output (the root CMakeLists.txt target when there is one), naming the expected path even before the first build. The run log offers Copy output (ANSI-stripped), Copy argv, and Re-run with the same program, args, cwd and env. Named run configurations snapshot the whole form (program, args, cwd, env) under a name; save, update and delete are offered in the panel, and empty or duplicate names are refused (configurationNameError in src/lib/run/configurations.ts).

  • Terminal: an embedded terminal built on portable-pty (pty::pty_open / pty_write / pty_resize / pty_close) with src/terminal/Terminal.tsx, supporting multiple sessions in tabs (Cmd+T / Cmd+W, close button per tab), opening in the active file's directory when one is open. Font size is per session (A+/A-/A0), a session restarts in place with its cwd and font size preserved, Copy all writes the scrollback to the clipboard, and the status strip shows the pid and the working directory, which is updated from the shell's OSC 7 output. Not yet exercised in a real desktop window by this agent; the backend and component are present.

  • Debug: lldb-dap sessions launched from a .quarry/launch.json preset, composed for an unconfigured Cargo project (which also passes the Rust formatter initCommands), or attached to a running process by pid via processes::list_processes and src/debug/ProcessPicker.tsx. Line breakpoints with verified and pending states, conditional and hit-count breakpoints, run to cursor (Cmd+F10, runToCursor in src/debug/session.ts with temporary breakpoint handling), threads, frames (clicking a frame opens its source line), scopes, variables, hardware watchpoints, a paged hex memory pane and a disassembly pane. The memory pane copies the loaded bytes as hex text (16 per line, address-prefixed, via the same formatter it renders), copies a row's address on click with a two-second Copied 0x… flash, and steps through the last 20 visited start addresses with Back and Forward, disabled at the ends; clipboard failures surface in the pane's error line. Exception breakpoints toggle from the adapter's own filter list through dap::dap_exception_filters and dap::dap_set_exception_breakpoints, and survive a restart. Variable values can be edited via dap::dap_set_variable and memory cells via dap::dap_write_memory. A pinned-variable watch pane re-reads pinned in-scope variables on each stop, reporting not in scope when a pinned variable is absent and unavailable when its read fails; pins survive a restart and clear when the session ends. A launch-time build uses the toolbar's selected profile and hands the debugger the executable the build reported, so a release session does not run a stale debug binary; a session whose profile changed while live says so in the panel.

  • Launch presets: the debug panel's Edit presets editor adds, duplicates, removes and reorders presets, and edits every field a preset holds: name, program, args, cwd, stop-on-entry, build and initCommands. build is a single-line field (placeholder cargo build) holding the preset's build command. initCommands is a textarea holding one command per non-empty line, with an inline hint spelling out the command script import <sysroot>/lib/rustlib/etc/lldb_lookup.py line that makes Rust Vec and String pretty-print. Saves go through write_launch_config, which rejects empty and duplicate names. Args are typed as one string and parsed with the run form's own splitArgs (src/debug/presets.ts over src/run/splitArgs.ts), rendered back for display by joinArgs, so a "b c" d keeps b c as one argument; the one gap is a literal " inside an argument, which cannot round trip. The panel validates the whole file before the write. The selection is held by preset name, so it survives a save, and renaming the selected preset falls back to the first entry. .quarry/launch.json stays the source of truth on disk.

  • Search: rg-backed palette with results grouped by file, keyboard navigation, and a visible cap when the result set is truncated. Case-sensitive, regex and whole-word toggles are in src/search/SearchPalette.tsx. Replace across files previews every change before writing, refuses to run on a stale preview, applies capture groups in regex mode, and reports one summary line (files changed, replacements made) with per-file errors collected in errors.

  • Quick open: Cmd+P file picker over files::list_files, ranked in src/quickopen/QuickOpen.tsx and src/quickopen/rank.ts, with a recent-files list. Ranking puts a file-name match above a path-only match of the same query length and prefers matches at word and path-segment boundaries; matched characters are highlighted, a trailing space followed by more text filters the current results without another search, and recent files appear in their own group above the rest.

  • Recent projects: dropdown of previously opened roots backed by settings::remember_root and src/projects/RecentProjects.tsx. A row can be removed without closing the open project; removal persists through persist in src/projects/RecentProjects.tsx, which reads settings, replaces recentRoots, and writes them back via writeSettings. A row's path can be copied to the clipboard, and removing the last entry leaves the No recent projects empty state.

  • Problems quick fixes: each Problems entry carries a Fix button that opens code actions from lsp_code_actions in src/problems/ProblemsPanel.tsx, sending the diagnostics at that position in the request, since clangd and rust-analyzer only offer a diagnostic-bound fix whose diagnostic is in the context.

  • Tests: list_tests and run_test feed a Tests dock with pass/fail status, filtering by binary and result, sorting, and run-all scoped to the filtered set (src/tests/filterTests.ts). Result filtering covers all, failed, passed and not-run; copy failures writes one path::test_name line per failed test; per-test failure output is available on an expanded row; rerun failed re-runs only the failed tests. The tests dock offers copy name per row, copy output on an expanded failure, and copy failures (disabled when nothing failed).

  • Source control: a Git view with status, per-file diff, an open-in-editor flow, a commit box (git_commit), branch listing and switching (git_branches, git_checkout, dropdown in src/git/SourceControl.tsx), a History tab listing recent commits (git_log), and a unified diff for a selected commit (git_commit_diff), plus git_status and git_file_diff commands. Discard changes run through git_discard with a two-step confirmation prompt in src/git/SourceControl.tsx (Discard / Cancel). Stage and unstage all are offered per group with counts. Amend rewrites the last commit with message validation (empty or oversized messages refused). Blame annotations render in the editor through src/editor/blame.ts (wired into src/editor/Editor.tsx) on top of the git_blame backend, toggled by the title-bar Blame button (blameOn in src/App.tsx); the Source Control Blame tab groups the same data by commit. Copy actions: copy path on change rows and copy hash on history rows and blame groups, with propagation stopped so the row action does not fire.

  • Breadcrumb: a strip showing the file path and the symbol chain containing the caret, built from lsp_symbols in src/breadcrumb/Breadcrumb.tsx. Each segment copies its qualified name (a::b::c), and the whole chain copies from one action.

  • Updates: the app checks for a newer release on start through tauri-plugin-updater (src/updates/store.ts), falling back to the GitHub releases API when the updater has no answer. An installable offer shows a dismissible strip with Update now, which downloads with progress and relaunches into the new version; a release this build cannot install is named as published but not installable, and never offers a button that would do nothing. Releases are signed, and the public key baked into the app is what verifies a download.

  • Type hierarchy: Shift+Alt+T opens src/lsp/TypeHierarchyPanel.tsx over lsp::lsp_prepare_type_hierarchy and lsp::lsp_type_hierarchy. Supertypes and subtypes are separate views, each level is fetched only when a node is expanded, arrow keys and Enter work the tree, Escape closes it, and a server that reports no hierarchy for the symbol says so instead of erroring.

  • Expression evaluation: the dock's Evaluate field answers for Rust and C alike — n, n + 1 and a Rust String render — because every request carries the stopped frame's frameId. Without one lldb-dap refuses each expression with can't evaluate expressions when the process is running, which is exactly what the earlier "broken for Rust" verdict measured. watch, variables, clipboard and an omitted context answer every expression; hover answers a bare variable but refuses operators (lldb's legacy expression mode); repl answers but prefixes lldb's $0 =. lldb's Rust parser is a subset: method calls (v.len()) and as casts fall back to Objective-C++ and report the adapter's "not supported" message. See docs/spikes/evaluate.md.

Still missing, and named here so it is not mistaken for done:

  • No run panel beyond args, cwd, env and output — run_program / stop_program stream run://output; src/run/ covers program, args, cwd, environment variables and an argv preview, but there is no richer run configuration UI.
  • No remote development, embedded targets, profilers, databases, Docker, AI assistance or plugin API.

What "parity" means here

Parity is defined as the daily loop, not the menu tree:

In scope Out of scope
completion, diagnostics, hover, goto, references, rename, code actions long-tail refactorings and intentions
build targets, profiles, run and debug configurations CPU and memory profilers (DFA)
breakpoints (conditional, log, data), frames, scopes, evaluate, watch remote development, embedded targets
memory view with paged unmapped regions, disassembly databases, Docker, AI assistance, plugin API
tests, project-wide search, terminal, git any language other than Rust and C/C++

That table is the target, not the current state; the Status section above is the current state. The full matrix, module seams, slices and estimates are in docs/plans/001-clion-parity.md, and the slice documents are indexed in docs/plans/README.md.

Documentation site

The docs live in website/ and are a static Next.js export that reuses the app's palette and fonts. Content is MDX under website/content/docs/; the sidebar, pager and search index all read website/src/lib/nav.ts.

cd website
bun install
bun run dev     # http://localhost:4321
bun run build   # search index + static export in website/out/

Stack

Layer Choice
Shell Tauri 2
UI React 19, Vite 8, TypeScript, Biome
Editor CodeMirror 6, with a hand-written LSP client over the shared framed pipe
Insight clangd, rust-analyzer — detected on PATH and via xcrun, never bundled
Debugger lldb-dap over raw DAP, one client for both languages
Formatting rustfmt, clang-format
Build cargo build --message-format=json
Search the rg binary

Code splitting: the editor is loaded through src/editor/LazyEditor.tsx, a ref-forwarding wrapper around a lazy(() => import("@/editor/Editor")) component, so CodeMirror 6 and its language packages stay out of the initial bundle. DebugPanel, Terminal, SearchPalette, QuickOpen and CommandPalette are also lazy()-loaded in src/App.tsx and rendered inside Suspense boundaries, so they only fetch when first opened. The Vite chunk-size warning threshold is raised to 700 kB in vite.config.ts because the editor chunk is CodeMirror and loads lazily; the default 500 kB limit would only restate that one dependency's size.

Commands

bun install
bun run tauri dev     # desktop app
bun run dev           # browser-only UI
bun check             # type check (bun builtin, all cores)
bun fmt               # bun fmt (Bun's built-in, configured by bunfig.toml [fmt])
bun lint              # biome lint --write .
bun run verify        # type check + biome check, the commit gate
bun test              # frontend unit tests over pure helpers (rank, splitArgs, hex, buffer, blame, search model)
bun run gate          # verify + tests, the commit gate
bun run build         # type check + vite build
bun run verify:bundle # check version agreement, .app, signature, launch smoke

Rust tests run from the Tauri crate: cd src-tauri && cargo test. Rust checks run there too: cd src-tauri && cargo check --all-targets and cd src-tauri && cargo clippy --all-targets -- -D warnings.

The formatter for TypeScript, CSS and Markdown is bun fmt (Bun's built-in, configured by bunfig.toml [fmt]); Biome lints only; bun run verify is the commit gate.

Tests

Rust tests live in src-tauri and run with cd src-tauri && cargo test. Frontend unit tests are bun test over pure helpers: ranking in src/quickopen/rank.ts, argument splitting in src/run/splitArgs.ts, hex helpers in src/debug/memory/hex.ts, buffer handling in src/project/buffer.ts, blame helpers in src/editor/blame.ts, the search model in src/search/model.ts, and test filtering in src/tests/filterTests.ts (covered by src/tests/filterTests.test.ts). The smoke scripts under scripts/ are the only place real language servers and debuggers are exercised. The commit gate is bun run gate (bun run verify plus bun test). Rust changes also require cargo check --all-targets and cargo clippy --all-targets -- -D warnings to pass; clippy is clean on the current tree with no #[allow(clippy::…)] added. CI runs on macOS for pushes to main and pull requests: it runs bun run gate, then bun run build, then cargo test, cargo clippy --all-targets -- -D warnings and cargo fmt --check in src-tauri. The smoke scripts are excluded because they need a real rust-analyzer and lldb-dap. See .github/workflows/ci.yml.

Smoke scripts

  • scripts/lsp-smoke.ts — initialize handshake against a language server.
  • scripts/lsp-ux-smoke.ts — navigation response shapes (hover, completion, definition, references).
  • scripts/dap-spike.ts — debugger capabilities, memory, breakpoints and formatters.
  • scripts/dap-eval-probe.ts — Rust evaluate attempts.
  • scripts/cxx-smoke.ts — clang diagnostic shape and the missing-cmake path.

License

MIT, see LICENSE. Zed, which has a comparable debugger memory view, is GPL-3.0 and no code is copied from it.

About

A focused IDE for Rust and C/C++ - CLion parity on the daily loop, built on Tauri 2 and CodeMirror, with clangd, rust-analyzer and an lldb-dap debugger including a hex memory view.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages