Enabling ecosystem growth?
I'm sure the Kaitai maintainers have noticed that there is a large pocket a Kaitai users, or devs who would be Kaitai users, who are not the original target audience (reverse engineers). These users are deploying their own binary formats and they want to use .ksy files as their format's *source definition*, and benefit from automatic tooling similar to how web developers use OpenAPI. You can see this faction in requests for features like automatic serialization and wireshark plugins.

I actually wrote a blog on this topic, and there was some good discussion in the hacker news comments linked at the bottom. https://anachronauts.club/~voidstar/log/2022-03-24-openapi-for-binfmt.gmi

At the moment, the only practical way to contribute to the ecosystem of tools that can work with ksy files is to submit a pull request to the Kaitai compiler itself. Creating an independent tool would mean re-doing much of the work (especially the pre-compile passes) that the compiler already does -- in every single tool. (Tools written in JVM languages can, at least, call into the Scala codebase. But other languages are out of luck.)

This creates a centralized bottleneck for ecosystem growth. Ideally, I could write my own tool in python that works with a .ksy to generate test cases or something... but unless I'm willing to re-implement a lot of the Kaitai compiler, I won't be able to determine the size of a user-defined type or evaluate expressions, etc..

Is there a plan to tackle this? E.g.:

* Katai compiler adds a plugin API; launch plugins as a subprocess and communicate over a pipe so the plugin can be written in any language.
* Some sort of two-stage process: .ksy files get compiled into something more verbose, and then those get compiled into various language targets from there.
* The Kaitai core library gets written in a native compiled language, and packaged with thin FFI wrappers in a myriad of languages so that devs in many languages can write tools that use the compiler.
* Maybe something like gRPC's reflection protocol?

I'm just interested to know if something like this is on the team's radar / roadmap, or even compatible with the vision.