Skip to content

Manticore\Ds: #[TypeDef] element types for enum-backed ints and packed structs #273

Open

Description

@blacktrs

Problem

#[TypeDef(repr)] binds a Manticore\Ds array to a class over a scalar repr (i8 … u32, f32, f64). Enum-backed ints and packed structs (several fixed-width fields per element) are not supported, so an array of {kind: u8, flags: u16} is two arrays or one cell per element.

Proposal

Extend the binding to enum-backed ints (store the backing value, read back the enum case) and to packed structs (element = fixed record in the buffer, field access compiled to offset loads). Design per §4 of the Ds design note.

Status

No consumer yet (the php-cs-fixer fork, the only candidate, is a sandbox). Build this when a program needs a record array.

Split out of #101 (part 7).

Activity

  1. added
    enhancement
    on Oct 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions