Skip to content

Conversation

@kurtjd
Copy link
Contributor

@kurtjd kurtjd commented Jan 19, 2026

Some serialization/deserialization was omitted because it wouldn't be used by the EC, however the service-message crates can be used outside the EC, so add them in.

I experimented with zerocopy for this in #678 but it's a bit clunky and getting it to work for Battery messages will be challenging, so just rolled it by hand for now since that's what we are already doing. Can revisit later once we've decided on a serialization strategy.

Tested these by using the service message crates to serialize/deserialize messages over UART in the ratatui and works fine for the ones I could test (though many of the battery commands are not yet supported by the ratatui app).

Was going to wait until OpenDevicePartnership/embedded-batteries#39 is merged, but it seems relying on an updated embedded-batteries causes a ton of breakage and headache, so just have functions for converting in here and can update a later time.

@kurtjd kurtjd requested review from tullom and williampMSFT January 19, 2026 20:06
@kurtjd kurtjd self-assigned this Jan 19, 2026
@kurtjd kurtjd added the enhancement New feature or request label Jan 19, 2026
@kurtjd kurtjd moved this to In review in Embedded Controller Jan 19, 2026
@kurtjd kurtjd force-pushed the add-missing-serialization branch from b848f7d to 35dd92c Compare January 20, 2026 01:01
@github-actions
Copy link

github-actions bot commented Jan 20, 2026

Cargo Vet Audit Passed

cargo vet has passed in this PR. No new unvetted dependencies were found.

@github-actions github-actions bot added the cargo vet PRs pending auditor review label Jan 20, 2026
@kurtjd kurtjd force-pushed the add-missing-serialization branch 2 times, most recently from efe0b92 to ac065f5 Compare January 20, 2026 02:20
@kurtjd kurtjd force-pushed the add-missing-serialization branch from ac065f5 to 25884c1 Compare January 20, 2026 02:30
@kurtjd kurtjd marked this pull request as ready for review January 20, 2026 02:35
@kurtjd kurtjd requested a review from a team as a code owner January 20, 2026 02:35
@kurtjd kurtjd requested review from RobertZ2011 and asasine January 20, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cargo vet PRs pending auditor review enhancement New feature or request

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

1 participant