Stream: beginners

Topic: libraries


view this post on Zulip Artur Swiderski (Dec 01 2023 at 10:33):

hi how to create "C" style library in Roc ?

view this post on Zulip Anton (Dec 01 2023 at 13:06):

Do you mean C-style as in a .so or .a file?

view this post on Zulip Artur Swiderski (Dec 01 2023 at 14:12):

yes, library I could possibly link with C app provided I add proper header on behalf of it

view this post on Zulip Artur Swiderski (Dec 01 2023 at 14:14):

or maybe communicate via some other libraries

view this post on Zulip Anton (Dec 01 2023 at 14:45):

I think @Brendan Hansknecht and @Luke Boswell have done this before.

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 15:10):

--lib will give you a shared library. --no-link will give an object file.

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 15:11):

As for communication. There is no glue for c currently, so must things would need to be done manually

view this post on Zulip Artur Swiderski (Dec 01 2023 at 15:48):

@Brendan Hansknecht how to look inside to write proper header file for C?

view this post on Zulip Brendan Hansknecht (Dec 01 2023 at 15:52):

I don't think there is a good answer currently for any language except rust. For non-rust languages, what can be done is looking at existing example platforms and asking questions here. There isn't a guide for platform dev yet.


Last updated: Jul 06 2025 at 12:14 UTC