Context
This issue summarizes key findings from a review of relevant AdguardTeam repositories and outlines practical next steps to upgrade the adblock-compiler project. The intent is to maximize benefit by leveraging proven tools/libraries/research.
TL;DR - Top 3 Impact Actions
-
Integrate AGLint for Rule Validation
- Adopt
AdguardTeam/AGLint as a linting/validation engine for filter rules. This boosts reliability, supports multiple formats, and offloads future maintenance.
- Why high value: It's MIT-licensed (easy to adopt), maintained by AdGuard, and will make your project's validation as robust as possible, even for edge-case rules.
-
Leverage tsurlfilter for Smart Deduplication & Simulation
- Use
AdguardTeam/tsurlfilter as a dependency to simulate, parse, and perform semantic deduplication of filter rules beyond string/text checks.
- Bonus: Enables in-app/live testing ("does this rule work?") for end users.
- Legal: It's GPL-3.0; mind your own repo's license or wrap usage in a service if that matters.
-
Deep Dive & (Optionally) Port FiltersCompiler
- Study
AdguardTeam/FiltersCompiler. It's the reference implementation for filter transformation and validation, written in JS. Consider porting its core logic (especially filter/metadata combining logic) to C# or .NET if you want native performance or cross-platform CLI.
- Why: If you want to offer a .NET-native ecosystem for adblock compilation and not just web APIs.
Research Table
| Repo |
Value to Our Project |
My Thoughts |
| AGLint |
Plug directly into validation pipeline; very low effort, very high reward |
Absolutely recommended—quickest win, best license, already mature |
| tsurlfilter |
Power semantic deduplication/logical rule analysis |
Worth adding for advanced deduplication and functional tests, but careful with GPL dependencies |
| FiltersCompiler |
Model for a true compiler pipeline |
Fork or port is only needed if we want deep engine parity or .NET-native CLI; at minimum, use as a reference |
My Additional Thoughts
- These three steps would future-proof adblock-compiler, let us focus on UI/automation rather than low-level adblock quirks, and stand on the shoulders of best-in-class research.
- License compatibility and API boundaries matter—AGLint (MIT) is a no-brainer, tsurlfilter (GPL) should be isolated if needed.
- Long term: consider contributing improvements or bug-fixes upstream to AdguardTeam—ongoing synergy is likely given overlap.
Context
This issue summarizes key findings from a review of relevant AdguardTeam repositories and outlines practical next steps to upgrade the adblock-compiler project. The intent is to maximize benefit by leveraging proven tools/libraries/research.
TL;DR - Top 3 Impact Actions
Integrate AGLint for Rule Validation
AdguardTeam/AGLintas a linting/validation engine for filter rules. This boosts reliability, supports multiple formats, and offloads future maintenance.Leverage tsurlfilter for Smart Deduplication & Simulation
AdguardTeam/tsurlfilteras a dependency to simulate, parse, and perform semantic deduplication of filter rules beyond string/text checks.Deep Dive & (Optionally) Port FiltersCompiler
AdguardTeam/FiltersCompiler. It's the reference implementation for filter transformation and validation, written in JS. Consider porting its core logic (especially filter/metadata combining logic) to C# or .NET if you want native performance or cross-platform CLI.Research Table
My Additional Thoughts