Cast variable size data from SPI to array of structs

46 · Users Rust Lang · June 11, 2026, 12:20 a.m.
Summary
The author seeks advice on efficiently reading variable-sized data from SPI into an array of structs for an embedded HAL-async SPI driver related to the Pixy2 camera. They reference existing C++ code and discuss previous unsuccessful attempts using bytemuck and zerocopy, questioning whether a buffer should be added to the driver struct.