Skip to content

Packed and bitfield annotations #40

@fanpei91

Description

@fanpei91

Currently solod does not have directives about using packed and bitfield on struct. I hope that there will be such two directive annotations, which can be used like this: .

//so:packed
type sdshdr16 struct {
    len uint16
    alloc uint16
    flags uint8
    buf [0]byte
}

type node struct {
    size uint64
    count uint32 //so:bitfield(2)
    encoding uint32 //so:bitfield(2)
    recompress uint32 //so:bitfield(1)
    extra uint32 //so:bitfield(27)
}

Thank your job! Solod is the system programming language I am looking for years.

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