docs.rs failed to build adblock-0.1.35
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
adblock-0.8.9
Ad Block engine in Rust
Native Rust module for Adblock Plus syntax (e.g. EasyList, EasyPrivacy) filter parsing and matching.
It uses a tokenisation approach for quickly reducing the potentially matching rule search space against a URL.
The algorithm is inspired by, and closely follows the algorithm of uBlock Origin and Cliqz.
Somewhat graphical explanation of the algorithm:
Demo
Demo use in Rust:
extern crate adblock;
use Engine;
Node.js module demo
Note the Node.js module has overheads inherent to boundary crossing between JS and native code.
const AdBlockClient = require;
let el_rules = fs..;
let ubo_unbreak_rules = fs..;
let rules = el_rules.;
let resources = ;
// create client with debug = true
const client = ;
client.;
const serializedArrayBuffer = client.; // Serialize the engine to an ArrayBuffer
console.log;
console.log
// Match with full debuging info
console.log
// No, but still with debugging info
console.log
// Example that inlcludes a redirect response
console.log
TODO
- Function for extracting CSP directives
- Generate string representation of a rule when debug mode is off (i.e. initial rule is not available)
- Cosmetic filters