Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use simplfied Bitmap #120

Merged
merged 12 commits into from
Mar 11, 2024
Merged

use simplfied Bitmap #120

merged 12 commits into from
Mar 11, 2024

Conversation

demoray
Copy link
Contributor

@demoray demoray commented Mar 4, 2024

Replace bitmaps::Bitmap with a simplified bitmap implementation for the 256 wide use case needed by boreal.

This does a few things:

  • Provide a simplified interface for Bitmap based on what's used by boreal
  • Replaces a bunch of casts & slice indexing that could cause future issues with compile-time validation (by moving from indexing into the Bitmap by usize to u8)
  • Removes a MPL2 licensed dependency (which can be interpreted as incompatible with MIT/Apache)

Brian Caswell added 9 commits March 4, 2024 16:55
Replace `bitmaps::Bitmap` with a simplified bitmap implementation for
the 256 wide use case needed by boreal.

This does a few things:
* Provide a simplified interface for Bitmap based on what's used by
  boreal
* Replaces a bunch of casts & slice indexing that could cause future
  issues with compile-time validation (by moving from indexing into the
  Bitmap by usize to u8)
* Removes a MPL2 licensed dependency (which can be incompatible with
@demoray
Copy link
Contributor Author

demoray commented Mar 6, 2024

note: the coverage task is currently failing due to issues addressed in #122.

@vthib
Copy link
Owner

vthib commented Mar 6, 2024

Sorry about all the CI issues. I wouldn't mind removing a dependency, especially as we only use the 256 sized bitmap, so making a simple, custom impl makes sense. I'll try to review this before the end of the week

Copy link
Owner

@vthib vthib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution, I have a few comments but otherwise lgtm. I'll probably add a few additional tests afterwards but it's fine for this PR

boreal/src/bitmaps.rs Show resolved Hide resolved
boreal/src/matcher/literals.rs Outdated Show resolved Hide resolved
boreal/src/matcher/literals.rs Outdated Show resolved Hide resolved
boreal/src/bitmaps.rs Outdated Show resolved Hide resolved
@demoray
Copy link
Contributor Author

demoray commented Mar 10, 2024

@vthib I've applied your suggestions.

@demoray demoray requested a review from vthib March 10, 2024 18:53
@vthib
Copy link
Owner

vthib commented Mar 10, 2024

@demoray approved, but needs a rebase, probably after the merges of the nightly fixes.

@vthib vthib merged commit a486751 into vthib:master Mar 11, 2024
12 checks passed
@demoray demoray deleted the simplified-bitmap branch March 11, 2024 18:05
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