aws / aws-nitro-enclaves-image-format

This library provides the definition of the enclave image format (EIF) file used in AWS Nitro Enclaves.
Apache License 2.0
11 stars 16 forks source link

Switch to using `bytes` for serialization #13

Open gkelly opened 1 year ago

gkelly commented 1 year ago

Description of changes: Simplify the serialization logic by switching to using the bytes crate instead of manually tracking buffer position and read/write sizes.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

gkelly commented 1 year ago

I know the advice here is to be frugal with the addition of new dependencies, but this is the Cargo.toml for bytes: https://github.com/tokio-rs/bytes/blob/master/Cargo.toml, it's a very thin crate and is designed for doing exactly the kind of thing being done manually here currently.