Skip to content

Rust ringbuffer#1825

Open
benma wants to merge 2 commits intoBitBoxSwiss:masterfrom
benma:rust-ringbuffer
Open

Rust ringbuffer#1825
benma wants to merge 2 commits intoBitBoxSwiss:masterfrom
benma:rust-ringbuffer

Conversation

@benma
Copy link
Collaborator

@benma benma commented Feb 25, 2026

Tested:

  • Nova firmware
  • Nova bootloader
  • factorysetup

Trivial wrapper around `VecDequeue`, with methods and C API matching
the asf4 utils_ringbuffer.h. With a similar API, we can replace all
uses of it easily.

The C ringbuffer was fixed size and not heap allocated, and
`VecDequeue` is dynamic and heap allocated. We simply panic once we go
above the "fixed" size to avoid filling up the whole RAM in case of a bug.
@benma benma requested a review from NickeZ February 27, 2026 21:50
@benma benma marked this pull request as ready for review February 27, 2026 21:50
@NickeZ
Copy link
Collaborator

NickeZ commented Feb 28, 2026

Did you test upgrading firmware over BLE? I'm curious if performance was impacted in any way.

@benma
Copy link
Collaborator Author

benma commented Feb 28, 2026

Did you test upgrading firmware over BLE? I'm curious if performance was impacted in any way.

Great point, I didn't consider performance.

I did a direct comparison now (with and without the commits of this branch, Nova bootloader) and the fw flashing was exactly the same speed - 1m53s.

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