Skip to content

Commit b904779

Browse files
authored
Merge pull request #439 from brave/code_structure_5
Code structure follow up #4 The implementation of NetworkFilterList has been moved to network_filter_list.rs. The bitflags dependency version has been bumped to 2.9.0, seahash to 4.1.0. The flatbuffers dependency has been added. FlatBuffers schema of the network filter list and the corresponding generated file have been added.
2 parents af0c65a + d73f091 commit b904779

17 files changed

+1409
-871
lines changed

.github/workflows/ci.yml

-20
Original file line numberDiff line numberDiff line change
@@ -66,23 +66,3 @@ jobs:
6666

6767
- name: Cargo test 'adblock' package (no default features)
6868
run: cargo test --no-default-features --features embedded-domain-resolver,full-regex-handling --tests --no-fail-fast
69-
70-
- name: Run Brave-specific tests
71-
# Only runs on one runner for a few reasons:
72-
# 1. windows doesn't expand the env var properly
73-
# 2. On windows, the `grep` command doesn't stop the job like it does on the others
74-
# 3. Although `shell: bash` might fix the windows issues, running this test on multiple
75-
# OS's isn't likely to catch bugs anyway
76-
if: matrix.os == 'ubuntu-latest'
77-
env:
78-
BRAVE_SERVICE_KEY: ${{ secrets.BRAVE_SERVICE_KEY }}
79-
TEST_NAME_FILTER: live_brave
80-
run: |
81-
# `cargo test` doesn't fail when it matches 0 tests.
82-
# This hackily checks that the filter is working.
83-
# If this check fails, something might have been renamed inadvertantly.
84-
echo "Ensure that '$TEST_NAME_FILTER' still matches exactly 2 tests."
85-
cargo test --all-features --test live --no-fail-fast -- --ignored "$TEST_NAME_FILTER" --list | grep "2 tests, 0 benchmarks"
86-
87-
# Now run the tests
88-
cargo test --all-features --test live --no-fail-fast -- --ignored "$TEST_NAME_FILTER"

Cargo.lock

+25-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,19 @@ url = "2.5"
2828
percent-encoding = "2.1"
2929
once_cell = "1.8"
3030
regex = "1.5"
31-
bitflags = "1.3"
31+
bitflags = { version = "2.9.0", features = ["serde"] }
3232
itertools = "0.13"
3333
idna = "1.0.3"
3434
serde = { version = "1.0", features = ["derive", "rc"] }
35-
seahash = "3" # seahash 4 introduces a breaking hash algorithm change
35+
seahash = "4.1.0"
3636
memchr = "2.4"
3737
base64 = "0.22"
3838
rmp-serde = "0.15"
3939
cssparser = { version = "0.29", optional = true }
4040
selectors = { version = "0.24", optional = true }
4141
serde_json = "1.0"
4242
thiserror = "1.0"
43+
flatbuffers = { version = "25.2.10", optional = true }
4344

4445
[dev-dependencies]
4546
criterion = "0.5"
@@ -96,3 +97,4 @@ css-validation = ["cssparser", "selectors"]
9697
content-blocking = []
9798
embedded-domain-resolver = ["addr"] # Requires setting an external domain resolver if disabled.
9899
resource-assembler = []
100+
flatbuffers-storage = [ "flatbuffers" ]

data/rs-ABPFilterParserData.dat

-9.31 MB
Binary file not shown.

0 commit comments

Comments
 (0)