hashmismatch / packed_struct.rs

Bit-level packing and unpacking for Rust
MIT License
164 stars 30 forks source link

Can we use loops in generated code for arrays? #102

Open geovex opened 1 year ago

geovex commented 1 year ago

If someone use something like

#[derive(PackedStruct)]
#[packed_struct(endian = "lsb")]
pub struct Record {
    data: [u8; 5000],
    csum: u16,
}

Macro will explode with code for data_0, data_1..... data_5000. Compile times become inadequately big, and lsp will hang. Can we mitigate this somehow?