Instead of integrating every glue language into Roc, wouldn't it be simpler to output a machine readable glue definition, which could be easily parser from any language? Apart from easier integration into more languages, it would have other benefits, for example including the Roc type alongside the C one, so glue authors could autogenerate different naming styles (e.g. namespaces in Zig, instead of underscores) and maybe generate different APIs based on the structure of the Roc type. It would also allow easier platform extensibility (i.e. a less hacky version of trantor).
Instead of integrating every glue language into Roc
There is no plan to do this. The intention is for people to write their own glue scripts.
We use Roc as a plugin and it gives you nice types to work with -- you can codegen anything from that, even a machine readable definition of the types if you would prefer something else to work with.
The three glue scripts in the repository are basically just examples to help get people started and to help us jumpstart the platform ecosystem... it can be difficult to roll the types by hand without glue.
Also we needed glue scripts to help us test the feature, and also we chose those three languages to help prevent an API that was too opinionated or assumed a particular language was the target
notramo has marked this topic as resolved.
Thanks for the answer!
Last updated: Oct 15 2026 at 17:56 UTC