Skip to content

Export ADBLOCK_RUST_DAT_VERSION constant#594

Open
gutchin1 wants to merge 3 commits intobrave:masterfrom
gutchin1:feature/export-ADBLOCK_RUST_DAT_VERSION
Open

Export ADBLOCK_RUST_DAT_VERSION constant#594
gutchin1 wants to merge 3 commits intobrave:masterfrom
gutchin1:feature/export-ADBLOCK_RUST_DAT_VERSION

Conversation

@gutchin1
Copy link
Copy Markdown

@gutchin1 gutchin1 commented Feb 5, 2026

No description provided.

@gutchin1 gutchin1 requested a review from a team as a code owner February 5, 2026 08:50
@gutchin1
Copy link
Copy Markdown
Author

gutchin1 commented Feb 5, 2026

I need to have this variable accessible from outside of the crate, for proper .dat handling

@antonok-edm
Copy link
Copy Markdown
Collaborator

Can you say more about your use case?

@gutchin1
Copy link
Copy Markdown
Author

gutchin1 commented Feb 8, 2026

Can you say more about your use case?

I am emedding the crate in my project, and since the serialization format gets updated, I need a way for other components to be aware of this change and provide the serialized input accordingly

@gutchin1
Copy link
Copy Markdown
Author

@antonok-edm
pls take a look again

@antonok-edm
Copy link
Copy Markdown
Collaborator

I am emedding the crate in my project, and since the serialization format gets updated, I need a way for other components to be aware of this change and provide the serialized input accordingly

I think you might be misinterpreting the purpose of the serialized format... it's intended to be used as a local cache, so that it's faster to load previously-parsed filters (e.g. at application startup). It's not intended as a full replacement for filter lists.

If the format version number has incremented, deserialize will immediately exit with a VersionMismatch error. So the worst case is that cheap check to discover that the format is outdated followed by reparsing the filters (which still shouldn't be extremely slow either).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants