Skip to content

Long compile times for structs with large arrays #110

Open
@jkorinth

Description

@jkorinth

Using a large array in a struct causes compile times to explode:

use packed_struct::prelude::*;

#[derive(PackedStruct)]
#[packed_struct(endian = "msb")]
pub struct MyStruct {
    x: u16,
    y: u16,
    d: [u16; 20000],
}

fn main() {}

I've tried analyzing with cargo b --timings but that didn't yield anything interesting. Let me know if I can help investigate.

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