flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Rust Alignment

Open CasperN opened this issue 1 year ago • 0 comments

The Rust Flatbuffers library currently relies on Rust's notion of alignment, which is platform dependent. We should audit/remove all use of align_of::<T>() and use our own trait for flatbuffers types.

Note that since &[u8] is alignment 1 in Rust, our generated Rust code doesn't assume things are aligned, but we may create unaligned buffers that will be read on other languages/platforms

Discovered in #7015 Blocking #7103

CasperN avatar Sep 13 '22 13:09 CasperN