Introducing Glue: Unified toolchain for your schemas
Guy Waldman
February 22, 2026 (2 hours ago)
TL;DR:
New open source project - a unified toolchain for generating code from a single data model definition.
It includes an IDL (Interface Definition Language), CLI and a VS Code extension.
Our code revolves around data models and interfaces.
It is table stakes in almost any codebase to have internal or external modeling of the data we wish to transfer, with different presentations (from REST, GraphQL and gRPC to IPC) or data exchange formats (from JSON and protobuf to ASN.1 and Avro).
However, throughout my career it seems that the question "how do I model my data?" is supposed to have a trivial answer but it isn't.
Every time I needed the trivial step in a new project to define schemas and share them, I found there is no real industry standard other than OpenAPI, sometimes Protobuf, or perhaps even Avro IDL or Smithy if you're in AWS.
To take a simple example:
You write a new API server and it has an OpenAPI spec. You go "Swagger first" and write the spec (rather than auto-generating the Swagger from code).
You decided that your web server is in Go - what do you do now? Well, you (or nowadays your LLM) search the internet for a well-adopted CLI (most stars on GitHub? Come on, be honest) that can generate Go code from an OpenAPI spec. Maybe oapi-codegen!
What if it's Python and not Go? Maybe openapi-python-client. JavaScript/TypeScript? openapi-typescript. Ad nauseum.
There exists also the openapi-generator tool which can support multiple languages/frameworks, so maybe this can reduce all to one.
But wait, going back to the second point there, we mentioned binary protocols! We have now summoned gRPC and protobuf to the discussion.
Here is a "hello world" Protobuf definition for a User object:
message User {
string id = 1;
string email = 2;
string name = 3;
}
Note the = {number} - Protobuf is a binary wire format, so you have to specify the ordering of fields for deterministic encoding/decoding. Same goes for bitsets and all its primitive types. That is expected.
However, what if you also want to transport a user object via JSON but also protobuf?
From what I can gather, you are forced to use more tooling in this case, since OpenAPI and Protobuf are not interoperable, and you need to generate one from the other.
All this to say - there are a few challenges here:
Every codegen tool has its own set of configs, variations and inconsistencies, often within the same language ecosystem. If you have a polyglot codebase, or want to share types with another team or codebase, and they use a different language - there are at least two of these CLIs involved. If you use an OpenAPI spec and diverge from HTTP or the formats it supports natively - you need another tool to maintain a single source of truth. Maybe this problem can be solved or at least minimized with some Swiss-army-knife unified toolchain for OpenAPI, but from my experience it's almost never the case.
OpenAPI is great, but as its name implies it's meant and designed for APIs, and primarily REST APIs - for a web server where you want to model the endpoints, the schemas for the requests and responses this all makes sense, but what if you only care about the types?
Then you sort of "abuse" OpenAPI solely for generating types (so your openapi.json relies mostly on the components section) and you now need to manage large JSONs with (IMO) a verbose syntax. This gets complicated if you want to model a binary protocol, custom protocol, etc.
More tools = increased supply chain attack surface. You may care about this more or less, depending on your circumstances.
Honest opinion - LLMs can run circles around boilerplate and help with all of these pain points.
They may find you a good maintained library, set up all the codegen, help you update and maintain them, etc.
Maybe we should avoid talking about this altogether? Maybe... this can all lead to (gasp) a new standard?!
https://xkcd.com/927
I say - fortune favors the bold! Maybe we can think of a solution where you can have all the nice things:
Simple, generic yet extensible IDL which abstracts itself from the presentation layer (like REST)
Human-friendly and LLM-friendly - should be well-structured, easy to maintain and have very sane defaults
Agnostic to languages/frameworks - generic to accompany the widest variety of usecases, but has "escape hatches" to allow for customization
Single CLI for generating code from this IDL
Ecosystem around this IDL to make working with it easy
UI (like SwaggerUI or Redoc) that makes it nice to share and explore the schemas and interfaces
I tried to do this - meet Glue!
##What is Glue?
Glue is an open source project that I am releasing which I've been hacking on and off on for the past few weeks.
I am starting with:
An Interface Definition Language (IDL) that is language-agnostic, minimalistic and supports definitions of data models (structs, enums, etc.) and interfaces (REST, like OpenAPI)
CLI for generating code from .glue files and validating them
VS Code extension which includes syntax highlighting and LSP (error diagnostics, go-to definition, hover definitions, etc.)
Online playground (runs Glue's codegen compiled into WebAssembly so it can run in your browser)
I think there can be a very exciting roadmap for this, but I'm hesitant to share until I know if this is actually useful.
You can play around with Glue right now in the interactive editor on the homepage - https://gluelang.dev
Example of a Glue specification:
/// Use triple slash for comments that should be included in generated code as docstrings
model Apartment {
/// The apartment number, e.g. "1A"
number: int
// Use double slash for internal comments and not included in generated code
residents: Person[]
}
model Person {
name: string
age: int
residence_end_date?: string // Optional fields are denoted with a `?`
is_employed: bool = false // Default values are supported
}
model Building {
name: string
apartments: Record<int, Apartment> // Complex types like maps, lists, etc. are supported
address: Address
// Nested models are supported
model Address {
street: string
city: string
country_code: string
zipcode: string
}
}
// Glue supports endpoints (like OpenAPI), which you can optionally define with sane defaults.
/// Get building information by the building ID
endpoint "GET /building/{building_id}" GetBuilding {
responses: {
200: Building
4XX: ApiError
5XX: ApiError
}
}
model ApiError {
code: Code
message: string
enum Code: "INVALID_REQUEST" | "NOT_FOUND" | "INTERNAL_ERROR"
}
##Roadmap
I have a bigger vision for Glue, but I genuinely don't know whether the value proposition resonates with other developers as much as I think it can.
If there is growing interest, I would look forward to develop this further and hopefully turn this into something of an ecosystem.
Happy to hear thoughts, and feel free to raise any bugs or suggestions on GitHub (guywaldman/glue).