Getting set up
You need Windows 10 or 11 and Rust stable 1.98 or later (the MSVC toolchain). A release build
(tools/installer/build.ps1) also needs CMake, NASM and LLVM's libclang (winget install
Kitware.CMake NASM.NASM LLVM.LLVM, or LIBCLANG_PATH set to a folder with libclang.dll): it
turns on the engine's browser-like connection (browser-connection), built on BoringSSL from
source. Everyday builds and tests leave it out.
cargo build
cargo run -p grabbit-app
To try changes without touching your own downloads, give the app a separate data folder:
set GRABBIT_DATA_DIR=C:\some\empty\folder
cargo run -p grabbit-app
cargo run -p grabbit-labserver -- --faults "rate=2M" starts a local test server that serves
generated files with whatever trouble you ask for (slow connections, cuts, busy answers, no
ranges; GET / lists them), so downloads can be tested without the internet.
Branches
devis where work lands. Branch from it and open your pull request against it.mainis what's released: the website publishes from it and release tags (vX.Y.Z) are cut on it. It only moves by a pull request fromdev(a release) or a hotfix.- Hotfix: branch from
main, open the pull request againstmain, then mergemainback intodev. - Release: merge the
dev→mainpull request, check outmainat that commit, and runtools/installer/publish.ps1(-DryRunfirst): it builds the installer, zips, symbols and extensions here, signsSHA256SUMS.txtwith Grabbit's release key from your gpg keyring, publishesvX.Y.Zwith its CHANGELOG section, and rebuilds the website. No runner builds Rust.
Before you open a pull request
Run these yourself before a pull request merges, or before you push to dev: GitHub's CI
runs only the quick ones (the extension's tests and packages, the old-name check, the pictures'
list and the upstream-sync tool's tests, about a minute, on pull requests into main), never the
Rust build. Each works on a clean clone:
cargo fmt --all --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace
node tools/extension/test.mjs
python tools/upstream-sync/test_sync.py
python tools/rename/check.py --done
Keep changes focused and match the code around them. A few rules hold everywhere:
- Clean room. Grabbit contains no code, binaries, artwork, icons, sounds or text from Internet Download Manager or any other download manager. Never disassemble, decompile or patch another program, and never bypass anyone's licensing. See Not a reverse-engineering project.
- Every text the user sees goes through
crate::i18n(t,tc,tn,fmt). Grabbit is English only, so they return the English text. Data inside a sentence (a file name, an address, a size) goes in throughi18n::ltrori18n::isolate, so a file name in Arabic or Hebrew can't reorder the sentence around it. - Grabbit is Windows only. Windows-only calls live in
crates/app/src/win32.rs; the rest of the workspace is safe, portable Rust (unsafe_code = "deny"). - Fix causes, not cases, and keep producers and consumers of shared data (the download list, the browser extension's messages, the catalogs) in step.
Languages
Grabbit, its installer, the browser extension and the website are in English only. The translations
(86 languages), the language picker and the translation tools are kept on the
archive/multiplatform-i18n branch.
Reporting problems
Use Help → Report a problem in the app: it opens the bug report form with your version, system and how Grabbit was installed filled in. The form asks for the same when you open it yourself. Security problems: see SECURITY.md.
Pull requests are accepted under the project's licence, the GNU GPL, version 3 or later.