Stream: beginners

Topic: Cross-platform c bindings


view this post on Zulip Ilya Shmygol (Apr 05 2025 at 18:05):

Hi! Are there any bindings to use a Rust library (or C one) in Roc apart from platform?

view this post on Zulip Anton (Apr 05 2025 at 18:16):

Hi @Ilya Shmygol,
Unfortunately not, can you share what you have in mind? Perhaps I can suggest an easy alternative solution

view this post on Zulip Ilya Shmygol (Apr 05 2025 at 18:22):

Basically, I was just wondering while playing with Roc. An example I had in mind would be a regexp parser. I appreciate that writing a native parser might be a better approach, but it's so complicated. I thought it would be nice to use something like PCRE until someone brave implements a production-ready native library.

view this post on Zulip Brendan Hansknecht (Apr 06 2025 at 02:18):

Yeah, currently it would have to either be manually added to a fork of a platform or built directly in Roc.

view this post on Zulip Brendan Hansknecht (Apr 06 2025 at 02:19):

Long term, I would expect some platforms to support shared librarly ffi (will be kinda awkward, but should be totally doable).

view this post on Zulip Ilya Shmygol (Apr 06 2025 at 19:19):

Got it, thanks. Still one of the best languages I know.


Last updated: Jul 06 2025 at 12:14 UTC