Skip to content
This repository has been archived by the owner on May 18, 2022. It is now read-only.

Try out scroll or zerocopy for de/encoding of PDUs #53

Open
jonas-schievink opened this issue Apr 28, 2019 · 1 comment
Open

Try out scroll or zerocopy for de/encoding of PDUs #53

jonas-schievink opened this issue Apr 28, 2019 · 1 comment
Labels
area: utils Code Area: Utilities and scaffolding used throughout the project good first issue Call for participation: Good for newcomers status: needs code An implementation or a bugfix need to be written type: enhancement A new feature or an improvement for an existing one

Comments

@jonas-schievink
Copy link
Owner

jonas-schievink commented Apr 28, 2019

scroll allows deriving decoding and encoding traits, which is just what I want. We should try porting rubble to use that instead of bytes.rs.

We can also try out the zerocopy crate, which allows C-like reinterpretation of arbitrary bytes in safe Rust. Unfortunately it's near impossible to contribute to zerocopy since it's part of fuchsia, but it looks promising.

@jonas-schievink jonas-schievink added area: utils Code Area: Utilities and scaffolding used throughout the project status: needs code An implementation or a bugfix need to be written type: enhancement A new feature or an improvement for an existing one labels Apr 28, 2019
@jonas-schievink jonas-schievink changed the title Try out scroll for de/encoding of PDUs Try out scroll or zerocopy for de/encoding of PDUs Jul 26, 2019
@jonas-schievink
Copy link
Owner Author

It'd be pretty easy to add a method to ByteReader that reads any type implementing zerocopy::FromBytes. Then we can gradually move hand-written deserialization code to make use of that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: utils Code Area: Utilities and scaffolding used throughout the project good first issue Call for participation: Good for newcomers status: needs code An implementation or a bugfix need to be written type: enhancement A new feature or an improvement for an existing one
Projects
None yet
Development

No branches or pull requests

1 participant