Open gatesn opened 11 months ago
PyBUF_SIMPLE is a flag used to denote a buffer is a pure 1-dimensional contiguous unsigned u8 array.
This is a pretty common use-case, so we should make it close to trivial to map back and forth to Zig []u8.
[]u8
In fact, we could support quite a lot of the 1-dimensional buffer protocol using comptime.
[]u32
[]const u32
Related -> https://github.com/fulcrum-so/ziggy-pydust/issues/29
PyBUF_SIMPLE is a flag used to denote a buffer is a pure 1-dimensional contiguous unsigned u8 array.
This is a pretty common use-case, so we should make it close to trivial to map back and forth to Zig
[]u8
.In fact, we could support quite a lot of the 1-dimensional buffer protocol using comptime.
[]u8
-> writable simple[]u32
-> writable, check format string, check alignment, etc.[]const u32
-> readonly, etc.