Repository navigation
Improve ergonomics and re-add mutable interface & ffi - #1
Merged
Merged
Conversation
yuyuyureka
force-pushed
the
feature/extend
branch
2 times, most recently
from
December 2, 2026 01:45
d146341 to
a8d5bed
Compare
yuyuyureka
marked this pull request as ready for review
December 2, 2026 01:49
yuyuyureka
force-pushed
the
feature/extend
branch
3 times, most recently
from
December 2, 2026 12:07
a68e845 to
134b8a4
Compare
yuyuyureka
force-pushed
the
feature/extend
branch
from
December 2, 2026 12:14
5852d13 to
fb092ee
Compare
By making ADTProperty packed, we can derive IntoBytes despite the flexible array member. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
1. trace is stored as offsets, which is both easier for the future ffi and mut interfaces 2. node_path_trace() returns a handle on which .get_reg() can be chained Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Instead of each handle storing a full view of the ADT for navigation, only store everything after its header (which is sufficient to navigate to properties, subnodes and next siblings. This is a refactoring in preparation for the mut interface. Additionally, this factors out node_from_slice and property_from_slice and their respective checks, as these are now required both in the ADT container as well as the ADTNode, and the checks will be re-used by the mut versions. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
This allows navigating the ADT with mutable borrows (`root_mut()` / `node_path_mut()`, and then mutating properties, provided the structure of the device tree and length of properties stays the same. Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
It's not easy to restore the alignment guarantee, so use get_cells_u8 on the byte slice Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
yuyuyureka
force-pushed
the
feature/extend
branch
from
December 2, 2026 12:23
fc3f9d9 to
8b3fc64
Compare
yuyuyureka
force-pushed
the
feature/extend
branch
5 times, most recently
from
December 2, 2026 17:25
16bcd2f to
f27ee0a
Compare
This allows navigating template ADTs successfully Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
There was otherwise no-ffi way to obtain an &mut ADT Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
Signed-off-by: Yureka Lilian <yureka@cyberchaos.dev>
yuyuyureka
force-pushed
the
feature/extend
branch
from
December 3, 2026 05:43
f27ee0a to
b8f421b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Please check all boxes that apply:
Signed-off-by:trailer to every commitAll boxes must be checked before your pull request can be reviewed.