Skip to content

Refactor: Replace BitVec dependency with plain bool vectors - #10

Merged
jbeyerstedt merged 4 commits into
mainfrom
chore/remove-bitvec-dependency
Jul 24, 2026
Merged

Refactor: Replace BitVec dependency with plain bool vectors#10
jbeyerstedt merged 4 commits into
mainfrom
chore/remove-bitvec-dependency

Conversation

@jbeyerstedt

@jbeyerstedt jbeyerstedt commented Mar 4, 2026

Copy link
Copy Markdown
Collaborator

The bitvec crate seems to be unmaintained and is not compatible with the latest Nom release (if we need to update at some point).

It also doesn't help us quite so much here since most of the data is byte aligned anyways, so I would rather have less dependencies and a bit more code.
I added a dependency on arbitrary-int though to properly represent the 4, 5 and 15 bit values we have.

TODO:

  • Test with more data than in the unit tests
    • Encoding works just fine
  • Wait to have a release version of 0.3.0 before merging these potentially breaking changes

Comment thread tmp.rs Outdated
Comment thread tmp.rs Outdated
Comment thread src/encode.rs Outdated
@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch from 51b61e2 to 805838d Compare March 4, 2026 12:57
@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch 2 times, most recently from e6fc2b5 to 6fe7c1f Compare March 4, 2026 13:04
@jbeyerstedt jbeyerstedt added this to the v0.4.0 milestone Apr 20, 2026
@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch from 6fe7c1f to 5c45c0e Compare April 20, 2026 14:54
@jbeyerstedt

Copy link
Copy Markdown
Collaborator Author

rebased to clean up merge conflicts (since main-branch has experienced some refactoring)

@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch from 5c45c0e to f7c30bb Compare May 12, 2026 13:17
@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch 11 times, most recently from c797d4c to 841dd22 Compare July 21, 2026 14:52
@jbeyerstedt

Copy link
Copy Markdown
Collaborator Author

Now all individual commits compile again

@jbeyerstedt
jbeyerstedt force-pushed the chore/remove-bitvec-dependency branch from 841dd22 to bd52633 Compare July 24, 2026 07:37

@BendixBuchheister BendixBuchheister left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I haven't looked into all the changes from each struct, and focussed more on looking at the new encode/decode functions.
That part looks fine to me, and since the unit tests still work, and you already tested that everything still works with real data, i would say the code should be fine to merge

@jbeyerstedt
jbeyerstedt merged commit a12170d into main Jul 24, 2026
3 checks passed
@jbeyerstedt
jbeyerstedt deleted the chore/remove-bitvec-dependency branch July 24, 2026 08:44
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