{"id":13448413,"url":"https://github.com/brave/adblock-rust","last_synced_at":"2025-04-23T20:52:50.296Z","repository":{"id":38239234,"uuid":"176353330","full_name":"brave/adblock-rust","owner":"brave","description":"Brave's Rust-based adblock engine","archived":false,"fork":false,"pushed_at":"2025-04-17T23:24:14.000Z","size":44178,"stargazers_count":1643,"open_issues_count":72,"forks_count":141,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-18T11:19:37.170Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brave.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-18T19:11:43.000Z","updated_at":"2025-04-18T07:14:34.000Z","dependencies_parsed_at":"2023-09-25T01:34:51.465Z","dependency_job_id":"298ea15a-1e17-41c9-8a82-e6cfe1a7ba1a","html_url":"https://github.com/brave/adblock-rust","commit_stats":{"total_commits":679,"total_committers":28,"mean_commits":24.25,"dds":"0.43446244477172313","last_synced_commit":"9fb6154e640d0d8abba877f350615d84dabb6d5c"},"previous_names":[],"tags_count":83,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brave%2Fadblock-rust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brave%2Fadblock-rust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brave%2Fadblock-rust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brave%2Fadblock-rust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brave","download_url":"https://codeload.github.com/brave/adblock-rust/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250514760,"owners_count":21443208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T05:01:44.839Z","updated_at":"2025-04-23T20:52:50.269Z","avatar_url":"https://github.com/brave.png","language":"Rust","funding_links":[],"categories":["Rust","Web and Cloud Security","Ad Blockers","others"],"sub_categories":["Secure Frameworks"],"readme":"# adblock-rust\n\n[![crates.io](https://img.shields.io/crates/v/adblock.svg)](https://crates.io/crates/adblock)\n[![npmjs.com](https://img.shields.io/npm/v/adblock-rs.svg)](https://www.npmjs.com/package/adblock-rs)\n[![docs.rs](https://docs.rs/adblock/badge.svg)](https://docs.rs/adblock)\n![Build Status](https://github.com/brave/adblock-rust/actions/workflows/ci.yml/badge.svg)\n[![License](https://img.shields.io/badge/License-MPL--2.0-blue)](LICENSE)\n\n### _Putting you back in control of your browsing experience._\n\n`adblock-rust` is the engine powering [Brave](https://brave.com)'s native adblocker, available as a library for anyone to use. It features:\n\n- Network blocking\n- Cosmetic filtering\n- Resource replacements\n- Hosts syntax\n- uBlock Origin syntax extensions\n- iOS content-blocking syntax conversion\n- Compiling to native code or WASM\n- Rust bindings ([crates](https://crates.io/crates/adblock))\n- JS bindings ([npm](https://npmjs.com/adblock-rs))\n- Community-maintained Python bindings ([pypi](https://pypi.org/project/adblock/))\n- High performance!\n\n## Getting started\n\n`adblock-rust` is used in several projects, including browsers, research tools, and proxies.\nIt may be a good fit for yours, too!\n\nSee [docs.rs](https://docs.rs/adblock) for detailed API documentation.\n\nAlso check the [Rust example](./examples/example.rs) or the [NodeJS example](./js/example.mjs).\n\n### Optional features\n\nThe following `cargo` [features](https://doc.rust-lang.org/cargo/reference/features.html) can be used to tweak `adblock-rust` to best fit your use-case.\n\n#### CSS validation during rule parsing (`css-validation`)\n\nWhen parsing cosmetic filter rules, it's possible to include a built-in implementation of CSS validation (through the [selectors](https://crates.io/crates/selectors) and [cssparser](https://crates.io/crates/cssparser) crates) by enabling the `css-validation` feature. This will cause `adblock-rust` to reject cosmetic filter rules with invalid CSS syntax.\n\n#### Content blocking format translation (`content-blocking`)\n\nEnabling the `content-blocking` feature gives `adblock-rust` support for conversion of standard ABP-style rules into Apple's [content-blocking format](https://developer.apple.com/documentation/safariservices/creating_a_content_blocker), which can be exported for use on iOS and macOS platforms.\n\n#### External domain resolution (`embedded-domain-resolver`)\n\nBy default, `adblock-rust` ships with a built-in domain resolution implementation (through the [addr](https://crates.io/crates/addr) crate) that will generally suffice for standalone use-cases. For more advanced use-cases, disabling the `embedded-domain-resolver` feature will allow `adblock-rust` to use an external domain resolution implementation instead. This is extremely useful to reduce binary bloat and improve consistency when embedding `adblock-rust` within a browser.\n\n#### Parsing resources from uBlock Origin's formats (`resource-assembler`)\n\n`adblock-rust` uses uBlock Origin-compatible resources for scriptlet injection and redirect rules.\nThe `resource-assembler` feature allows `adblock-rust` to parse these resources directly from the file formats used by the uBlock Origin repository.\n\n#### Thread safety (`unsync-regex-caching`)\n\nThe `unsync-regex-caching` feature enables optimizations for rule matching speed and the amount of memory used by the engine.\nThis feature can be disabled to make the engine `Send + Sync`, although it is recommended to only access the engine on a single thread to maintain optimal performance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrave%2Fadblock-rust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrave%2Fadblock-rust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrave%2Fadblock-rust/lists"}