An ad is an ad.
The zero-dependency, ultra-fast WebAssembly ad-blocking engine written in pure Rust.
Modern web ad blockers have become bloated with 15 years of technical debt: 300,000+ outdated rules, contradictory whitelist exceptions that quietly allow Outbrain and Taboola onto media portals, megabytes of bloated JavaScript bundles, and heavy memory footprints.
Rustad was built on a single, uncompromising rule: An ad is an ad.
Engineered from scratch in pure standard library Rust, Rustad compiles to a microscopic ~53 KB WebAssembly binary that runs in browser service workers with zero runtime heap allocations, instantaneous
- Zero Crates.io Dependencies: Built exclusively with Rust standard primitives. No external dependencies, no unsafe third-party crates, no dependency supply-chain risks.
- Microscopic Footprint: The entire release WebAssembly engine (
rustad.wasm) weighs just ~53 KB. Starts up in 0 ms with virtually zero RAM footprint. - Compile-Time Assembly (
build.rs): 100% of rule parsing, normalization, canonical sorting, and buffer size calculations happen at compile time. The runtime binary contains only pre-indexed static slices. - Zero-Allocation Memory Protocol: Host environments exchange URLs and retrieve generated CSS/JSON using a static C-ABI shared memory protocol (
rustad_input_ptr/rustad_output_ptr). - Clean Manifest V3 Architecture: Native Chrome Manifest V3 extension featuring declarative network request protection, service workers, and surgical DOM shielding.
Rustad defends your browsing experience through four specialized, coordinated layers:
┌────────────────────────────────────────────────────────────────────────┐
│ RUSTAD 4-LAYER DEFENSE │
└───────────────────────────────────┬────────────────────────────────────┘
│
┌───────────────────────────────┼───────────────────────────────┐
│ │ │
▼ ▼ ▼
1. NETWORK LAYER 2. COSMETIC LAYER 3. SCRIPTLET LAYER
(Chrome MV3 DNR) (Rust WASM Engine) (Main World Injection)
Blocks ad servers, Zero-pixel CSS collapse: Defuses video ad streams
trackers & telemetry display: none !important; (YouTube prerolls) and
before packets wire. opacity: 0, 0 margin/padding. anti-adblock traps.
│ │ │
└───────────────────────────────┼───────────────────────────────┘
│
▼
4. ANONYMOUS LIVE UPDATER
(Automated Chrome Alarm)
Pulls clean rules daily via
updateDynamicRules with zero
cookies and zero telemetry.
Pre-filtered, 100% ASCII-compliant ruleset operating at the browser engine level. Intercepts and blocks tracking beacons, telemetry endpoints (Bugsnag, Sentry, Cloudflare Insights), and ad servers before requests leave the computer.
When ad containers are removed from the network, empty boxes or layout gaps often remain. Rustad's WebAssembly engine queries domain and global selectors in microseconds and injects an extreme CSS layout collapse:
{
display: none !important;
visibility: hidden !important;
opacity: 0 !important;
pointer-events: none !important;
height: 0 !important;
min-height: 0 !important;
max-height: 0 !important;
width: 0 !important;
min-width: 0 !important;
max-width: 0 !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
overflow: hidden !important;
line-height: 0 !important;
font-size: 0 !important;
}Server-side ad insertion (like YouTube video prerolls and unskippable ads) and anti-adblock traps cannot be stopped by CSS alone. Rustad runs surgical micro-primitives inside the page's MAIN execution context via chrome.scripting to neutralize ad placement metadata (ytInitialPlayerResponse.adPlacements) before players initialize.
A background alarm periodically checks for updated rulesets, seamlessly applying fresh rules using chrome.declarativeNetRequest.updateDynamicRules. 100% anonymous: zero telemetry, zero cookies, zero user analytics.
Note
Official Google Chrome strictly blocks off-store .crx drag-and-drop installations with CRX_REQUIRED_PROOF_MISSING (requiring Chrome Web Store cryptographic proofs). For Chrome, use the .zip package via Load unpacked:
- Download
rustad_vX.Y.Z.zipfrom the Latest Release. - Unzip the archive into a folder.
- Navigate to
chrome://extensionsand turn on Developer mode (toggle in the top-right corner). - Click Load unpacked in the top-left and select the unzipped directory.
- Download
rustad_vX.Y.Z.crxfrom the Latest Release. - Open
chrome://extensionsand ensure Developer mode is enabled. - Drag and drop the
.crxfile directly into the browser window to install.
- Rust toolchain (1.75+ recommended):
rustup target add wasm32-unknown-unknown
# 1. Clone the repository
git clone https://github.com/amaranthic/rustad.git
cd rustad
# 2. Run unit tests and verification
cargo test
# 3. Check linter rules
cargo clippy --all-targets
# 4. Compile the WebAssembly release binary
cargo build --target wasm32-unknown-unknown --release
# 5. Copy the generated WASM binary into the extension folder
cp target/wasm32-unknown-unknown/release/rustad.wasm rustad/rustad.wasmNow load the rustad/ folder into your browser as an unpacked extension.
rustad/
├── Cargo.toml ← Rust package configuration & strict linter flags
├── build.rs ← Compile-time rule processor & code generator
│
├── rules/ ← Human-curated, surgical rule source files
│ ├── domains.txt ← Extreme ad & tracker domain blocklist
│ ├── patterns.txt ← High-impact URL path & wildcard rules
│ ├── exceptions.txt ← Strict unbreak whitelist entries
│ ├── cosmetics.txt ← Element-hiding CSS selectors
│ └── scriptlets.txt ← Video ad defusers & anti-adblock stubs
│
├── src/ ← Pure Rust engine (0 crates.io dependencies)
│ ├── lib.rs ← C-ABI WASM exports & static memory buffers
│ ├── engine.rs ← URL classification & cosmetic coordination
│ ├── domain.rs ← Hostname extraction & O(log N) binary search
│ ├── pattern.rs ← Zero-allocation wildcard & separator glob matcher
│ ├── cosmetic.rs ← CSS selector resolution & subdomain walking
│ ├── scriptlet.rs ← Scriptlet lookup & compact JSON serializer
│ └── generated/
│ └── rules.rs ← AUTO-GENERATED compile-time static slices
│
├── rustad/ ← Packaged Chrome Manifest V3 extension
│ ├── manifest.json ← Extension manifest & permission declarations
│ ├── rules.json ← Compiled declarativeNetRequest static ruleset
│ ├── rustad.wasm ← Compiled ~53 KB WebAssembly binary
│ ├── worker.js ← Background service worker & badge manager
│ ├── shield.js ← Generic 0ms content script & CSS injector
│ ├── icons/ ← App icons (16px, 48px, 128px)
│ └── popup/ ← Minimal dark-mode control interface
│
└── .github/
└── workflows/
└── release.yml ← Automated daily release & asset packaging workflow
Dual-licensed under either:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
at your option.