Skip to content

We must not use vectors in extern structs #1634

@IntegratedQuantum

Description

@IntegratedQuantum

They don't have a guaranteed memory layout, see ziglang/zig#24179 (comment)

this is a requirement for #1583

Problematic places:

  • QuadInfo in models.zig
  • ChunkData in chunk_meshing.zig
  • Particle in particles.zig (this one is even missing the extern declaration)

I think the best solution for now is probably just to use e.g. align(16) [3]f32 instead of Vec3f and coerce them in all use-cases

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlythis issue is limited in scope and/or knowledge of Cubyz internals, good for newcomersrefactorshuffle code around

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions