Skip navigation
Announcing Grain DDL: code generation by and for demanding engine developers.
0:00 / 0:54

Announcing Grain DDL: code generation by and for demanding engine developers.

Michael Labbé

@frogtoss1K followers

Visit on X
82 likesDownloadOriginal post

14,369 views

Announcing Grain DDL: code generation by and for demanding engine developers. Define your structs and data once. Write custom generators for protocols, save files, language interop, shaders, databases, more. No macros, no metaprogramming. Generate reviewable code on every keystroke. 300kB compiler exe. Windows, Mac, Linux. Closed beta applications are now open - link in replies.

10 Comments

Comments from the original post on X (Twitter)

  • Guy Waldman's profile picture

    @guywald

    Hi! This is a really cool project, and if you’re interested I developed this a few months ago: Would be happy to support new targets for Glue if you’re up to it

    3 likes

  • Michael Labbé's profile picture

    @frogtoss

    I see the paralels. The types in Grain DDL are isomorphic to C, and allow you to specify how and where they are encoded in memory. Any source language would need to be able to express this in order to have a non-lossy representation of the data structures. Grain->glue would be the first exercise. Possible to write new exporters without changing the source. Best to visit it for the public release when final syntax is locked in.

    1 like

  • Guy Waldman's profile picture

    @guywald

    Yep totally makes sense and sounds good friend, feel free to do that. I got inspired to do Protobuf after seeing @jonhoo’s stream where he generated Avro IDL, so had similar goals. One of the problems I tried to solve other than the “one source of truth” thing, is the verbosity and no sane defaults for many of those IDLs, so tried to make it simple by default and extensible for power users. People say with AI it doesn’t matter anymore, but obviously disagree with that premise 😅 Wrote about it a bit here if you have patience for my rambles:

  • Michael Labbé's profile picture

    @frogtoss

    @jonhoo Thanks for the link. I'll give it a read when things settle down this morning!

    1 like

  • Wilbur Fenyman's profile picture

    @WilburF42982

    so kinda like metadesk by dion systems ?

    1 like

  • Michael Labbé's profile picture

    @frogtoss

    I haven't used Metadesk. Primary influence was a DDL Parser released by Insomniac almost 15 years ago, and a personal desire to address pain points from 25 years of multiplayer game development.

    1 like

  • Vicente Ferrari Smith's profile picture

    @vicenteferrari_

    Cool! I've been working on something similar in my own project. I have access to JBlow's Jai, which has amazing metaprogramming capabilities. For example I can tag a function "@\ServerRpc" and it generated all the boilerplate to call it remotely.

  • Kacper Szwajka's profile picture

    @SzwajkaKacper

    Intresting. Can I try it ?

  • Michael Labbé's profile picture

    @frogtoss

    Yes! There is a closed test underway right now. How:

    1 like

  • Dmitry's profile picture

    @L771834

    Need more information on what the thing actually does and what is the intended use. The description in the twit can be read as anything.