Stream: beginners

Topic: Small example of calling zig/rust/c/c++ from Roc?


view this post on Zulip cgatdv (Dec 14 2023 at 17:55):

Having difficulty finding any, but is there any small example repos of calling any of those languages from Roc?

view this post on Zulip Brendan Hansknecht (Dec 14 2023 at 20:21):

Roc can not do arbitrary CFFI to call these languages

view this post on Zulip Brendan Hansknecht (Dec 14 2023 at 20:21):

All interactions of this sort must be done through IO exposed by the platform

view this post on Zulip Brendan Hansknecht (Dec 14 2023 at 20:22):

Throughout the examples, there are multiple platforms in each of those various languages.

view this post on Zulip Brendan Hansknecht (Dec 14 2023 at 20:23):

Some general info on platforms: https://www.roc-lang.org/platforms

view this post on Zulip Luke Boswell (Dec 14 2023 at 20:42):

I've tried to link to all the examples I could find in Roc Awesome https://github.com/lukewilliamboswell/roc-awesome?tab=readme-ov-file#embedding-examples


Last updated: Jul 05 2025 at 12:14 UTC