I am trying to write a platform just to try it out. I am using rust, because it has the most examples.
I can't figure out how to use roc glue. If I understand correctly, it 'translates' the types you created in roc to rust, so you can use them in functions in rust. Is this correct? If not, what does it do then? If yes, how to use it correctly?
If I run roc glue --help
, I see I have to provide a GLUE_SPEC
but what is this?
https://github.com/roc-lang/roc/blob/main/crates/glue/src/RustGlue.roc
That is the spec for rust
glue can help some currently, but still has a lot of limitations. A big part of the issue is that we plan to change how platforms work (glue is designed for the new flow). That said, overall, it should be helpful, just may take a bit of messing around to get it fully working (though that may have changed some recently with work from others)
A bunch of example platforms that work with glue live here: https://github.com/roc-lang/roc/tree/main/crates/glue/tests/fixtures
They are just our test cases.
Thanks! With the spec it worked. Still had to figure some stuff out, but I got a rust file. I will try it out now
Last updated: Jul 06 2025 at 12:14 UTC