Stream: beginners

Topic: Panic generating glue


view this post on Zulip Jasper Woudenberg (Jul 31 2026 at 20:08):

I'm trying to bootstrap a Roc platform project in Zig. I'm getting a panic when attempting to run the glue command, but I think I must be holding it wrong because I know there's already a bunch of succesful Zig platforms out there. Does anyone know what I'm doing wrong?

I have a local copy of the Roc source repo checked out at latest main at time of writing this.

I run the following command in my project:

roc glue ../../roc/src/glue/src/ZigGlue.roc ./host ./platform/main.roc

I'm getting this error:

thread 1716784 panic: glue invariant violated: glue schema record 'Types' missing field 'types'

I've tried emptying the hosted section in main.roc, but get the same error.

Does anyone know what I might be doing wrong?

view this post on Zulip Bryce Miller (Jul 31 2026 at 20:10):

Does roc check pass ok for main.roc? I had a problem with glue the other day and come to find out it was a type checking bug that also caused a panic when running roc check

view this post on Zulip Bryce Miller (Jul 31 2026 at 20:11):

But I got a different panic too

view this post on Zulip Luke Boswell (Jul 31 2026 at 20:47):

This is definitely a bug. At the minimum we should have an error message here.

view this post on Zulip Dan G Knutson (Jul 31 2026 at 20:51):

Possibly related, it might be nice to bake the out-of-the-box supported glue specs into the compiler, so that your version of roc brings along its correct versions of ZigGlue.roc (or RustGlue or CGLue).

view this post on Zulip Luke Boswell (Jul 31 2026 at 20:58):

The glue scripts also ship in the nightly tar files if I remember correctly

view this post on Zulip Richard Feldman (Jul 31 2026 at 21:01):

I'd rather not bake those into the compiler because I don't want Roc's compiler releases to be coupled to other languages' releases - that's how you get "hey when can you release a new Roc compiler version so we can finally get glue for the new Zig release?"

view this post on Zulip Richard Feldman (Jul 31 2026 at 21:01):

we now have roc install so it should in theory be easy to get those locally

view this post on Zulip Luke Boswell (Jul 31 2026 at 21:11):

Should we make a guide for roc install to put on the website? that seems helpful and we could include this use case I guess. Does anyone want to take a stab at that?

view this post on Zulip Jasper Woudenberg (Jul 31 2026 at 21:13):

roc check does pass for me, so that does not appear to be the problem. I'll try to put together a small reproducible example tomorrow and create an issue on Github. Thanks for all the help so far!


Last updated: Aug 12 2026 at 12:35 UTC