Summary
Please add official Zig language support to the flatc code generator.
Background
Zig is a systems programming language with growing adoption in the
native/embedded/performance-sensitive ecosystem. It compiles to native code, has no hidden
control flow, and interoperates directly with C ABI — making it a natural fit for FlatBuffers.
We are currently building zarrow, a Zig
implementation of Apache Arrow that depends on FlatBuffers for its IPC wire format. Right now
we rely on a third-party wrapper (flatbufferz)
to consume the generated code, because there is no official flatc --zig backend.
What we are asking for
- A
--zig backend in flatc that generates idiomatic Zig structs/unions for FlatBuffers
schemas.
- Generated code should target the current stable Zig release (0.15.x) and track breaking
language changes going forward.
Why now
- Zig 0.14+ has a stable package manager (
build.zig.zon), making it practical to distribute
a generated runtime as a dependency.
- Several projects (Arrow, TensorFlow Lite, game engines) already target Zig, creating demand
for first-class schema-based serialization support.
References
Summary
Please add official Zig language support to the
flatccode generator.Background
Zig is a systems programming language with growing adoption in the
native/embedded/performance-sensitive ecosystem. It compiles to native code, has no hidden
control flow, and interoperates directly with C ABI — making it a natural fit for FlatBuffers.
We are currently building zarrow, a Zig
implementation of Apache Arrow that depends on FlatBuffers for its IPC wire format. Right now
we rely on a third-party wrapper (flatbufferz)
to consume the generated code, because there is no official
flatc --zigbackend.What we are asking for
--zigbackend inflatcthat generates idiomatic Zig structs/unions for FlatBuffersschemas.
language changes going forward.
Why now
build.zig.zon), making it practical to distributea generated runtime as a dependency.
for first-class schema-based serialization support.
References