This directory contains canonical file formats and schemas used across Grida.
- Schema:
format/grida.fbs - File identifier:
"GRID" - File extension:
"grida" - Docs: FlatBuffers documentation
Most developers will use an OS-installed flatc.
- macOS (Homebrew):
brew install flatbuffers# Compiles the schema to a binary schema file (.bfbs)
flatc --schema --binary -o /tmp/grida-fbs-check format/grida.fbs
ls -la /tmp/grida-fbs-check# TypeScript
flatc --ts --ts-no-import-ext -o /tmp/grida-fbs-gen/ts format/grida.fbs
# Rust
flatc --rust -o /tmp/grida-fbs-gen/rust format/grida.fbsWe do not commit generated FlatBuffers bindings. For CI and Vercel builds we
use the repo script bin/activate-flatc, which downloads and caches a pinned
flatc release binary (currently v25.12.19) and runs it.
# Compiles the schema to a binary schema file (.bfbs)
python3 bin/activate-flatc -- --schema --binary -o /tmp/grida-fbs-check format/grida.fbs
# TypeScript
python3 bin/activate-flatc -- --ts --ts-no-import-ext -o /tmp/grida-fbs-gen/ts format/grida.fbs
# Rust
python3 bin/activate-flatc -- --rust -o /tmp/grida-fbs-gen/rust format/grida.fbsIn-repo generated code + automation:
- TypeScript:
packages/grida-format/— committed; regenerated onpnpm buildviaprebuild. Changes to generated TS files are expected in PRs that modifygrida.fbs.- Rust:
crates/grida/src/io/generated/— committed; regenerated onpnpm buildviaprebuild. Changes to generated Rust files are expected in PRs that modifygrida.fbs.Contributor workflow: after editing
grida.fbs, runpnpm build(or the individualprebuildscripts in each package) to regenerate bindings, then commit the updated generated files alongside your schema change.
For tracking how CSS, HTML, and SVG map into the Grida IR (and which properties are still missing), see the working group docs:
- docs/wg/format/ — index page with links to:
- Grida IR reference — canonical IR node types, paint, layout, effects
- CSS mapping — CSS → Grida IR property mapping and TODO tracker
- HTML mapping — HTML element → Grida IR node mapping
- SVG mapping — SVG → usvg → Grida IR mapping tracker
- Adobe Photoshop File Format Specification — PSD/PSB structure, image resources, layer and mask info; useful when comparing or aligning design-tool format concepts.
- Figma .fig (Kiwi) format — In-repo: extracted Kiwi schema (
fig.kiwi) and tooling for Figma’s binary.figformat; see/.ref/figma/.
See CHANGELOG.md.