Skip to content

Nickez/rust port com label#1974

Open
NickeZ wants to merge 3 commits into
BitBoxSwiss:masterfrom
NickeZ:nickez/rust-port-com-label
Open

Nickez/rust port com label#1974
NickeZ wants to merge 3 commits into
BitBoxSwiss:masterfrom
NickeZ:nickez/rust-port-com-label

Conversation

@NickeZ
Copy link
Copy Markdown
Collaborator

@NickeZ NickeZ commented May 18, 2026

Port the label component to rust so that it is easier to make it utf-8 safe.

@NickeZ NickeZ requested a review from benma May 18, 2026 10:52
NickeZ added 3 commits May 18, 2026 12:58
Move the label component implementation from C into the bitbox02 Rust
crate while keeping the existing C ABI through label.h. Update bindgen
inputs and build lists so firmware and unit-test builds link against the
Rust symbols. Extend the UI component test coverage for label offsets
and updates.
Avoid slicing strings inside a UTF-8 code point when truncating by byte
length. This keeps callers that apply byte caps from panicking on
multibyte input.
Truncate label text at a valid UTF-8 boundary before appending the
ellipsis. Add tests for mid-codepoint and exact-boundary
truncation.
@NickeZ NickeZ force-pushed the nickez/rust-port-com-label branch from 2f73cb2 to 7fe785d Compare May 18, 2026 10:58
@NickeZ NickeZ mentioned this pull request May 18, 2026
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.

1 participant