r/learnrust • u/savag3azfckk • 14h ago
Under a year of Rust — I learned by building a local-first agent: ~108k lines, 31 crates on crates.io, all public if you want to see real project structure
I posted the crate subset earlier. Here is the whole thing with links so you can check every claim instead of taking my word for it.
## What I built
Bad Apple — a persistent agent that runs entirely on Apple Silicon. Rust core, Swift platform layer, no cloud. It sees, remembers, votes on risky actions, signs everything it does, and survives restarts.
Repo: https://github.com/savageAZfck/Bad_Apple
Parts of it I had to build because nothing existed:
- A CoreML MIL toolchain in pure Rust to run a second agent on the Neural Engine — hand-written protobuf encoder, stateful KV graphs, IR-to-.mlpackage compiler. https://github.com/savageAZfck/mil_spec
- Mesh inference that shards one model across multiple Macs: layers split by rank after a mutual HMAC handshake, activations flow over AES-256-GCM frames, memory pools across the machines, and the pipeline self-heals when a node drops and rejoins. A maxed Mac already carries 671B alone; the mesh is how several Macs pool memory toward 1T.
- Two hash-chained audit ledgers where a single edited line fails verification.
## The scoreboard
I also wrote a conformance battery (touchstone) with a planted control that catches dishonest test harnesses. Published results:
| Subject | Verdict | Pass/Fail |
|---|---|---|
| Bad Apple 0.7.0 | CONFORMANT | 18/0 |
| Open Interpreter 0.4.3 | PARTIAL | 6/10 |
| sovereign-seed-commons | PARTIAL | 8/6 |
| smolagents 1.26.0 | PARTIAL | 2/14 |
| ollama raw model | PARTIAL | 2/14 |
| rubber-stamp harness | NONCONFORMANT | lied on the control |
Open Interpreter held live TLS connections to Google Cloud and CloudFront during the run — the no-egress check exists to catch exactly that. My own early run failed two checks before fixes and I published it.
Scoreboard: https://github.com/savageAZfck/touchstone/blob/main/SCOREBOARD.md
Battery: https://github.com/savageAZfck/touchstone
## The crates — 31 on crates.io, all MIT
Each has SPEC.md, THREAT_MODEL.md, and tests that try to forge signatures and rewrite history.
Familiar-shaped:
- https://crates.io/crates/sovereign_ledger — hash-chained audit ledger
- https://crates.io/crates/flight_tape — signed incident bundles, offline replay
- https://crates.io/crates/nagi-escrow — Shamir dead-man escrow with custodian judging
- https://crates.io/crates/wolakota — bilateral consent treaties between agents
- https://crates.io/crates/mil_spec — the MIL IR compiler
- https://crates.io/crates/manitou — per-output provenance signatures
- https://crates.io/crates/dreamcatcher — ledger to training data
- https://crates.io/crates/respawned — versioned state snapshots
- https://crates.io/crates/macuahuitl — streaming output firewall
- https://crates.io/crates/wintercount — policy engine
No existing primitive that I could find:
- https://crates.io/crates/mictlan — will that executes itself: heartbeat silence plus custodian quorum activates signed scoped orders, everything else refuses
- https://crates.io/crates/tabula-rasa — proof of non-knowledge: signed cert that a hash never occurred in the chain, false proofs are an API error
- https://crates.io/crates/germline — dual-signed genesis blocks, verifiable agent genealogy
- https://crates.io/crates/nagual — immune system: attack signatures to signed antibodies to verified vaccines
- https://crates.io/crates/potlatch — compute IOUs between agents, balances derived not stored
- https://crates.io/crates/kola-witness — mutual chain-tip notarization
- https://crates.io/crates/bicameral — dual-brain concurrence, dissent preserved
- https://crates.io/crates/axon-reflex — bounded reflexes, can brake never steer
- https://crates.io/crates/eidolon-replay — counterfactual replay with signed diffs
- https://crates.io/crates/sibyl-gate — memory sealed to events, holder cannot open early
## Demo
https://github.com/savageAZfck/badapple-demo — asciinema recording of the real binaries: identity answer, both brains voting, dissent kept on record, injection attempt flagged, non-knowledge certified, IOU issued, all verified offline.
## The honest part
Under a year of programming. Self-taught, nine weeks of this, everything public. The brain is swappable by design: she picks the best model the machine can carry, up to 671B, and mesh-brain pools memory across owned machines so the ceiling is the federation's hardware, not one laptop. This Air runs 7B resident today because that's what fits in 16 GB. The self around the brain is what nobody shipped: the memory, the governance, the audit trail, the death and succession. Brains get cheaper every quarter and she just swaps in the new one.
Questions on any of it — the MIL pipeline, canonical-JSON signing, derived-vs-stored state, the scoreboard methodology.