{"slug": "jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries", "title": "Jsonquery_GUI – A native Rust/egui desktop tool for streaming jq queries", "summary": "Jsonquery_GUI, a native Rust/egui desktop tool for streaming jq queries on large JSON files, was built by Anthropic's Claude AI from prompts by the repo owner, with Phase 1 MVP implemented and Phase 2 deferred. The tool supports jq-compatible queries via embedded jaq, streamed results, exact number round-tripping, NDJSON, and drag-and-drop (except on native Wayland).", "body_md": "A native desktop tool for browsing and querying large JSON files — drag in a\nfile (or paste JSON directly), write a [jq](https://jqlang.github.io/jq/)\ncompatible query, and see the result as a scrollable tree. Built in Rust with\n[egui](https://github.com/emilk/egui)/[eframe](https://github.com/emilk/egui).\n\nThis project — the code, the architecture docs, and the build tooling — was\nbuilt by [Claude](https://claude.com) (Anthropic's AI), working from a series\nof prompts by the repo owner. It's as much an experiment in AI-driven\nsoftware development as it is a JSON tool. The [architecture proposal and\ndecision docs](/nujufas/jsonquery_gui/blob/master/docs/index.html) capture the reasoning behind the design\nchoices along the way — open them locally in a browser to read them rendered\n(GitHub shows `.html`\n\nfiles as source, not as pages).\n\n**Phase 1 (MVP)** is implemented: full in-memory parsing, jq-compatible\nqueries via an embedded [jaq](https://github.com/01mf02/jaq), and a\nvirtualized-tree GUI for both the source document and query results. It's\nsolid for small-to-medium files.\n\nMulti-gigabyte files need Phase 2 (a memory-mapped, lazily-resolved index),\nwhich isn't built yet. See [ docs/decisions.html](/nujufas/jsonquery_gui/blob/master/docs/decisions.html) for\nthe full roadmap and the reasoning behind what's built vs. deferred.\n\n**Drag-and-drop doesn't work on native Wayland.** This is a gap in(the windowing library`winit`\n\n`eframe`\n\nuses), which only implements OS-level file drop events on Windows, macOS, and X11 —[rust-windowing/winit#1881](https://github.com/rust-windowing/winit/issues/1881)tracks it upstream.**Open File…** and pasting JSON directly both work fine everywhere. As a workaround, run under XWayland instead of native Wayland (if`DISPLAY`\n\nis set, XWayland is available) and drag-and-drop starts working:\n\n```\nWAYLAND_DISPLAY= cargo run --release -p jsonquery_gui\n```\n\n**Open large-ish files fast**— memory-mapped, no upfront full-file copy.** jq-compatible queries**— a real jq implementation ([jaq](https://github.com/01mf02/jaq)) embedded directly, not a reinvented query language.** Streamed results**— results are pushed to the UI as jaq produces them, so`first(...)`\n\n/`limit(...)`\n\ngenuinely stop early instead of running to completion in the background.**Exact number round-tripping**— big integers (snowflake IDs, Postgres bigints) survive a query byte-for-byte instead of quietly rounding through an`f64`\n\n.**NDJSON support**— a file with one JSON value per line is treated as a single queryable document, no separate \"format\" to pick.** Cancellable queries**— start a new query and the previous one is aborted, not queued behind it.** Drag-and-drop, file picker, or paste**— drop a file anywhere in the window, use** Open File…**, or just paste JSON into the text area and it loads immediately.** Tree or raw text results**— toggle the results panel between the virtualized tree and plain pretty-printed text you can select and copy with the mouse.**Light and dark themes**— switchable from the toolbar.\n\nPrebuilt Linux and Windows binaries can be produced with the scripts in\n[ build/](/nujufas/jsonquery_gui/blob/master/build) — see\n\n[Building](#building)below. (No binary releases are published yet; build from source in the meantime.)\n\nRequires a [Rust toolchain](https://rustup.rs/) (stable).\n\n```\ngit clone <this repository's URL>\ncd jsonquery\ncargo run --release -p jsonquery_gui\n```\n\n- Get JSON in: drag a file onto the window, use\n**Open File…**, or paste JSON straight into the text area on the left — it loads as soon as you paste, no extra step. - Write a query in the bar at the top — plain jq syntax, e.g.:\n\n```\n.users[] | select(.active) | {name, roles}\n```\n\n- Press\n**Run**(or`Ctrl+Enter`\n\n). Results stream into the right-hand panel. Switch it between**Tree**(virtualized, expand/collapse) and** Text**(plain, selectable/copyable pretty-printed JSON) with the toggle above it.\n\nNative release build for the current platform:\n\n```\ncargo build --release -p jsonquery_gui\n# binary at target/release/jsonquery_gui\n```\n\nCross-platform packaged builds live in [ build/](/nujufas/jsonquery_gui/blob/master/build), output to\n\n`dist/`\n\n:\n\n``` php\nbuild/linux.sh      # native release build -> .tar.gz\nbuild/appimage.sh   # native release build -> self-integrating .AppImage\nbuild/windows.sh    # cross-compiled via `cross`/Docker -> .zip\nbuild/all.sh         # all three, plus a listing of dist/\n```\n\n`build/windows.sh`\n\nneeds a working Docker daemon — it cross-compiles inside a\ncontainer that already has the mingw-w64 toolchain, so nothing is installed\non the host. `build/appimage.sh`\n\ndownloads `appimagetool`\n\non first use\n(cached in `build/`\n\n) and needs FUSE to run it.\n\nOn an actual Windows machine, skip the cross-compile and build natively instead:\n\n``` php\nbuild\\windows.bat   # native release build -> .zip\n```\n\nSame output layout as the other scripts (`dist\\jsonquery_gui-<version>-windows-x86_64.zip`\n\n).\nJust needs a Rust toolchain and PowerShell (bundled since Windows 10 /\nServer 2016) to create the zip.\n\nThe AppImage is desktop-pinnable out of the box: on first launch it registers\na `.desktop`\n\nentry and icon under `~/.local/share`\n\n(no `appimaged`\n\n/\nAppImageLauncher required), and the window's app ID matches\n`StartupWMClass`\n\nin that entry, so window managers correctly associate the\nrunning window with the launcher icon — right-click it in the\ntaskbar/dock and \"Pin\" works as expected.\n\n```\ncargo test --workspace     # unit tests (core parsing/tree logic, query engine)\ncargo clippy --workspace --all-targets\n```\n\nThe workspace is split into three crates so the non-GUI logic can be tested and benchmarked without pulling in a GUI toolkit:\n\n— file ingest (mmap + parse) and the virtualized-tree data layer.`crates/core`\n\n— the embedded jaq query engine and its`crates/query`\n\n`serde_json::Value ⇄ jaq_json::Val`\n\nconversion.— the eframe/egui application itself.`crates/app`\n\n[ scripts/gen_test_data.py](/nujufas/jsonquery_gui/blob/master/scripts/gen_test_data.py) generates a large\nsynthetic JSON (or NDJSON) file for exercising the app — nested objects,\nunicode, and 19-digit integer ids that exceed\n\n`f64`\n\n's exact-integer range, to\nexercise the number round-tripping:\n\n```\nscripts/gen_test_data.py                                    # ~200k records to test-data/large.json\nscripts/gen_test_data.py --target-size 1GB -o test-data/big.json\nscripts/gen_test_data.py --format ndjson -n 1000000 -o test-data/events.ndjson\n```\n\nEach run also prints a handful of jq queries worth trying against the file it\njust generated (filtering, nested-field access, aggregation with\n`group_by`\n\n, and one that highlights the exact-integer round-tripping) —\nsee `SAMPLE_QUERIES`\n\nin the script, kept next to the record shape it\ndescribes so the two can't drift apart.\n\nThe design — pipeline, indexing strategy, concurrency model, crate layout —\nis written up in [ docs/](/nujufas/jsonquery_gui/blob/master/docs/index.html):\n\n— problem statement, goals, high-level shape.`docs/index.html`\n\n— the full system design.`docs/architecture.html`\n\n— the decisions that shaped the build, open risks, and the roadmap.`docs/decisions.html`\n\n(Open these locally in a browser — GitHub renders `.html`\n\nfiles as source, not as pages.)", "url": "https://wpnews.pro/news/jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries", "canonical_source": "https://github.com/nujufas/jsonquery_gui", "published_at": "2026-09-03 22:04:00+00:00", "updated_at": "2026-09-03 22:23:29.128327+00:00", "lang": "en", "topics": ["developer-tools", "artificial-intelligence"], "entities": ["Jsonquery_GUI", "Claude", "Anthropic", "jaq", "egui", "eframe", "winit"], "alternates": {"html": "https://wpnews.pro/news/jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries", "markdown": "https://wpnews.pro/news/jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries.md", "text": "https://wpnews.pro/news/jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries.txt", "jsonld": "https://wpnews.pro/news/jsonquery-gui-a-native-rust-egui-desktop-tool-for-streaming-jq-queries.jsonld"}}