How Xantham relates to Glutinum
Xantham combines a reusable .NET compiler client with Fable binding generation across files and packages, generated imports, and reports of mapping compromises.
Xantham began as an exploratory fork of Glutinum. Both transform TypeScript declarations into F# bindings; Glutinum's documented pipeline is TypeScript AST → GlueAST → FSharpAST. Xantham's focus is package-wide generation and reusable compiler access from .NET.
Package graphs, imports, and shared types
Xantham handles the relationships needed to turn a package into usable bindings:
- Follow declarations across files. Start from public declarations, resolve cross-file references, and represent public subpaths as F# modules.
- Generate runtime imports. Keep a value's public import path separate from its declaration's location. A
createClientdeclared indist/internal/client.d.tscan still be imported fromexample-client. - Reuse dependency types. Emit dependency bindings, reference separately generated bindings, or map to existing F# types. Declaration catalogs let related generation runs share F# type identities.
- Review mapping compromises. Per-symbol findings in
manifest.jsonidentify types that need wider representations, including references widened toobj.
This reduces manual import wiring and helps separately generated bindings work with shared types. Dependencies still need to be available, their handling configured, and generated files compiled in order.
Reusable compiler access from .NET
Xantham.TypeScript.Wire is an independently published .NET client for TypeScript 7's tsc --api server. It exposes syntax trees, symbols, type-checker queries, and diagnostics, with protocol bindings generated from compiler sources. Other tools can use it without adopting Xantham's F# mappings.
The generator runs on .NET and targets Fable 5. Its nano-pass architecture, directly inspired by Farscape, divides collection, resolution, shaping, and rendering into small, focused transformations. The generator ships with the CLI; Wire is available separately.
TypeScript 7 and API stability
Xantham targets a pinned TypeScript 7 development build. Wire must match that compiler; upstream changes can require regeneration and adaptation. This is an ongoing maintenance commitment. Waiting for a stable API is a reasonable choice for other projects.
Custom generators: the direction ahead
The original design shared JSON from a Fable-based extractor with a .NET decoder and downstream generators. The archived README and Clef design post describe that architecture. Today's reusable interface is Wire.
Bringing your own generator remains a future direction. Today, building on Wire means supplying your own transformations. Xantham does not yet expose a supported custom-generator interface. The aim is to make higher-level transformations reusable so consumers can choose how to project declarations into their own bindings.
Xantham owes its beginnings to Glutinum and its nano-pass inspiration to Farscape. Compiler access, declaration identity, and import handling are useful areas for these projects to share experience and reduce binding maintenance together.