Skip to content

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

@geovex

Description

@geovex

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions