Stream: beginners

Topic: Rust platform development


view this post on Zulip mainrs (Nov 28 2023 at 19:40):

I am planning to write my own platform in Rust. I cannot find any documentation on how to do it. Taking a look at basic-cli is also really confusing. Nested ROC and Rust files. Glue code that is generated automatically, but nowhere is mentioned how it is generated.

roc glue and roc gen-glue-lib exist, but take some files as input that I have no idea what they are.

It seems most operations with effects are inside the Effect.roc file. generates Effect with [after, map, always, forever, loop] seems to generate a struct/type but it's nowhere to be found. And the tutorial never mentions anything about the generates keyword.

Is there like a short tutorial on how to do this?

view this post on Zulip Luke Boswell (Nov 28 2023 at 19:48):

I have a PR I've been working on but haven't touched much lately to cleanup glue gen for basic-cli so you can just run a script. At the moment it is a fair mess because it's usually the first platform to get features (written by hand) and then the tooling and infrastructure catches up. If you checkout basic-webserver that has a nicer glue setup. But note there are still some issues with glue which mean we have some workarounds to make it work. So it's definitely do-able rn, but I wouldn't suggest it's easy.

view this post on Zulip Luke Boswell (Nov 28 2023 at 19:50):

Documentation for platforms hasn't been written yet, there is still a lot going on in that space and so it would be a challenge to keep it up to date.

view this post on Zulip Luke Boswell (Nov 28 2023 at 19:51):

@Brendan Hansknecht done a few streams which go into detail about these things, and he explains along the way.

view this post on Zulip Luke Boswell (Nov 28 2023 at 19:52):

https://roc.zulipchat.com/#narrow/stream/316715-contributing/topic/Streaming.20Roc.20Development

view this post on Zulip mainrs (Nov 28 2023 at 19:53):

@Luke Boswell I wouldn't mind having to dig into platforms and figure out how they work if the glue mechanism worked. But having to manually write glue definitions without internal knowledge seems challenging. Sure, I can eventually figure it out, but it takes time I'm not willing to spend right now.

I'll skip roc for now. It seemed like the perfect language/runtime for my project though...
Thanks though, it is a super interesting project! I'll keep an eye on it :)

view this post on Zulip Notification Bot (Nov 28 2023 at 21:03):

6 messages were moved here from #beginners > Tasks and Error handling by Luke Boswell.

view this post on Zulip Richard Feldman (Nov 28 2023 at 21:11):

mainrs said:

I'll skip roc for now. It seemed like the perfect language/runtime for my project though...
Thanks though, it is a super interesting project! I'll keep an eye on it :)

yeah I'd say check back maybe like mid-2024...platform development is pretty rough right now - we've made a bunch of investments in it, but we're only partway to a smooth experience there for sure :big_smile:

thanks for checking it out, and hopefully it'll be a lot more solid when you check back!


Last updated: Jul 05 2025 at 12:14 UTC