native windows tool to query duckdb
- Rust 100%
|
All checks were successful
Build & Release Windows Executable / Build Standalone Windows 11 Executable & Publish Release (push) Successful in 2m38s
|
||
|---|---|---|
| .cargo | ||
| .forgejo/workflows | ||
| src | ||
| .gitignore | ||
| AGENTS.md | ||
| build.rs | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENCE.md | ||
| README.md | ||
QryDuck
This application was entirely vibe-coded using Gemini Argon 4 and Opus 5.5
QryDuck is a simple Windows native application to query DuckDB. The editor uses Vim motions.
Features
- Modal Vim SQL Editor: Full
Normal,Insert,Visual,VisualLine,Command, andSearchmodes with SQL syntax highlighting, relative line numbers, undo/redo (u/Ctrl+r), search (/,?,n,N,*), and:substitute(:s,:%s/old/new/g). - Execute Statement at Cursor: Press
Ctrl+Enter,F5,:run, or click ▶ Run SQL to execute the SQL statement under the cursor (or the active Visual selection). Use:runallto execute all statements in the buffer. - VS Code-Style Explorer & Multi-Buffer Tabs: Open a project folder (
Open Folder...or:e <folder>), double-click.sqlfiles to open them in tabs, and double-click*.duck.db/*.duckdb/*.dbfiles to connect or switch DuckDB databases. - Results, Schema & Query History: Virtualized results table with column sorting, substring filtering, cell inspector, CSV/JSON/Markdown export, live schema browser, and query history.
Building from Source
Prerequisites
- Rust Toolchain (rustup.rs)
- DuckDB CLI (
duckdb.exe):- Either installed on your
PATH/ via WinGet:winget install DuckDB.cli - Or embedded directly into
qry-duck.exeat compile time (see Single-File Standalone Build below).
- Either installed on your
1. Standard Build (Windows with MSVC Build Tools)
# Run unit tests
cargo test
# Build optimized release binary
cargo build --release
The compiled executable will be at:
target\release\qry-duck.exe
2. Building on Windows without Visual Studio Build Tools (gnullvm / llvm-mingw)
If you do not have the Visual Studio C++ Build Tools (link.exe) installed, you can build natively using the x86_64-pc-windows-gnullvm target and llvm-mingw:
# Install llvm-mingw (if not already installed) and the gnullvm target
winget install MartinStorsjo.LLVM-MinGW.UCRT
rustup target add x86_64-pc-windows-gnullvm
# Run unit tests
cargo test --target x86_64-pc-windows-gnullvm
# Build optimized release binary
cargo build --release --target x86_64-pc-windows-gnullvm
The compiled executable will be at:
target\x86_64-pc-windows-gnullvm\release\qry-duck.exe
3. Single-File Standalone Build (Embedded duckdb.exe)
To produce a completely self-contained qry-duck.exe that requires no external DuckDB installation (the embedded duckdb.exe is compressed into the binary at compile time and extracted to %LOCALAPPDATA%\qry-duck\bin on first launch):
# Point QRY_DUCK_EMBED_DUCKDB_PATH to your duckdb.exe binary before building
$env:QRY_DUCK_EMBED_DUCKDB_PATH = "C:\path\to\duckdb.exe"
cargo build --release
4. Optional: Signing the Binary (signtool.exe)
With the Windows 10/11 SDK installed (C:\Program Files (x86)\Windows Kits\10\bin\<version>\x64\signtool.exe):
$signtool = Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin\*\x64\signtool.exe" |
Sort-Object FullName -Descending | Select-Object -First 1 -ExpandProperty FullName
# Sign using a certificate in your Windows Certificate Store (CurrentUser\My)
& $signtool sign /n "QryDuck" /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 target\release\qry-duck.exe
# Or sign using a .pfx file from a commercial CA
& $signtool sign /f path\to\cert.pfx /p "<password>" /fd SHA256 /tr http://timestamp.digicert.com /td SHA256 target\release\qry-duck.exe
# Verify the Authenticode signature & DigiCert RFC3161 timestamp
& $signtool verify /pa /v target\release\qry-duck.exe