Repository navigation
Building from source
- Apple Silicon, macOS 15 or later.
- Rust stable. The crate uses edition 2024. Dependencies:
libcandserde_jsononly. - For the app: Xcode 27. Older Xcode versions fail to compile it (CI builds the app on Xcode 27 only); the built app runs on macOS 15+.
- For Passwordless Root: an Apple Development signing identity in your keychain. A free Personal Team certificate works: Xcode > Settings > Accounts > Manage Certificates > + > Apple Development.
The deployment target is macOS 15.0 (.cargo/config.toml sets MACOSX_DEPLOYMENT_TARGET). CI checks it with vtool -show-build.
git clone https://github.com/guiselig/sdtally.git
cd sdtally
cargo build --release
./target/release/sdtally --helpBinaries:
| Binary | Purpose |
|---|---|
target/release/sdtally |
The CLI |
target/release/sdc-coleta |
Research collector: writes an anonymized JSON report (--saida report.json). Not needed by the app |
If the repository is in iCloud Drive, put the build output elsewhere:
export CARGO_TARGET_DIR=/tmp/sdtally-targetapp/montar.sh # build, assemble and sign; prints the path of SDTally.app
app/montar.sh --abrir # same, then open itWhat app/montar.sh does:
- Builds
sdtally(release) with Cargo and the app and helper withswift build -c release. - Compiles the icon (
app/SDTally.icon) withactoolintoAssets.carplus a fallback.icns. - Assembles
SDTally.app:-
Contents/MacOS/SDTally(the app) andContents/MacOS/SDTallyHelper(the root helper), -
Contents/Helpers/sdtally(the CLI), -
Contents/Library/LaunchDaemons/io.github.guiselig.sdtally.helper.plist, - translations (
*.lproj) and the icon inContents/Resources, -
Info.plistwith the version fromCargo.tomland the current commit.
-
- Signs from the inside out with the hardened runtime and fixed identifiers (
io.github.guiselig.sdtally.clifor the CLI,io.github.guiselig.sdtally.helperfor the helper), then verifies withcodesign --verify --strict --deep.
| Variable | Effect | Default |
|---|---|---|
SDTALLY_BUILD |
Output folder | ~/Library/Caches/sdtally-build |
SDTALLY_ASSINATURA |
Signing identity (name or SHA-1) | First "Apple Development" identity found |
CARGO_TARGET_DIR |
Cargo output | $SDTALLY_BUILD/target |
Without an Apple Development identity the script signs ad hoc and prints a warning. The app runs, but:
- Passwordless Root cannot register (the helper requires a Team ID on both sides),
- Full Disk Access is lost on every rebuild, because macOS ties it to the signature.
cargo test --release
cargo clippy --release --all-targets -- -D warnings
swift test --package-path app
sh scripts/g9.sh| Suite | What it covers |
|---|---|
cargo test unit tests |
Parsers (including a 100,000-buffer test of the getattrlistbulk parser), rules, redaction, translations |
tests/fixture_apfs.rs |
Creates an APFS disk image with hdiutil (no root) containing a regular file, full and partial clones, a sparse file, a hard link, a compressed file and large xattrs, and checks the account against the image's used space |
tests/relatorio.rs, tests/golden/
|
Report shape and text output in Portuguese and English |
tests/categorias.rs |
Reproduced Settings categories against a scrubbed real measurement |
tests/nunca_apaga.rs |
No delete or trash APIs in production code |
tests/g9.rs |
No scareware words in user-facing Rust text |
tests/mcp.rs, tests/redigir.rs
|
MCP protocol and redaction |
tests/dryrun.rs |
Every recommended command has a read-only dry-run form and a documented source |
swift test --package-path app |
App logic with synthetic fixtures (app/Tests/SDTallyTests/Fixtures) |
scripts/g9.sh |
The anti-scareware check over Rust and Swift sources |
.github/workflows/ci.yml runs on every push to main, on pull requests, and on demand, using GitHub's standard macOS runners:
| Job | Runs on | What it does |
|---|---|---|
teste |
macOS 15, 26, 27 |
cargo test, release build, checks minos 15.0, creates a local snapshot holding about 200 MB, runs sudo sdtally --json and checks that the account closes, runs sdc-coleta
|
grep |
Ubuntu | Fails on network APIs; runs scripts/g9.sh
|
app |
macOS 15, 26, 27 |
swift test, builds the raw binaries, renders screenshots from synthetic fixtures, runs app/montar.sh to prove the app assembles |
fontes |
macOS 15, 26, 27, manual only | Research job comparing data sources against System Settings; never fails the build |
swift build --package-path app produces a raw app binary. Outside a .app, developer hooks are enabled through SDTALLY_* environment variables (for example pointing at a specific sdtally binary or fixture files, or rendering a section to PNG). They are documented at the top of app/Sources/SDTally/Foto.swift and are ignored inside the bundle.
Getting started
Understanding
Reference
Trust
Development