so based on my experience using roc glue at work, I have some ideas for things I think would be UX improvements, which I'd love to talk through!
in general, I think the glue experience I'd like to get to would involve:
roc glue to generate glue for an app module rather than a platform module, instead of erroring, it looks up the platform that app uses, and proceeds to generate glue for that platform as normalRustGlue.roc via source controlhosted modules automatically (this was always planned and I currently have a WIP PR for it)those all feel pretty uncontroversial to me, but I have some other ideas that seem to have more pros and cons
for example:
glue is to run it on every build of the platform (e.g. ideally someday in build.rs or build.zig) and then .gitignore all the files it generatesroc glue to regenerate the given directory from scratch every time (e.g. generate into a tempdir and then rename the tempdir over the target dir if everything wrote successfully) so that you don't end up with potential situations where some people on the team have stale stuff left over from previous builds, and a build tool happens to pick up on those and do different things with them, which would lead to non-reproducibility and potentially nasty bugs to track down. I think if we make this change now, everyone will make sure their builds work with it, but it would be a difficult breaking change to make in the future!roc glue's argument order and defaults to change - specifically, have glue spec first (likely a URL), then output dir (defaulting to "glue/") and finally target roc file (still defaulting to "main.roc") - so this way if I just say roc glue and then the URL, it will generate it from main.roc into a directory named glue/.roc glue glue/ ...) but it's hard for me to imagine someone having a directory that randomly happens to be named "glue", of all things, and getting burned by this.building on that point:
roc glue to incorporate on-disk caching - so that if you run it and your platform's roc code has not changed, it doesn't even bother regenerating anythingany thoughts on all of that welcome!
This all sounds reasonable to me. :+1:
Last updated: Jun 16 2026 at 16:19 UTC