hi how to create "C" style library in Roc ?
Do you mean C-style as in a .so or .a file?
yes, library I could possibly link with C app provided I add proper header on behalf of it
or maybe communicate via some other libraries
I think @Brendan Hansknecht and @Luke Boswell have done this before.
--lib
will give you a shared library. --no-link
will give an object file.
As for communication. There is no glue for c currently, so must things would need to be done manually
@Brendan Hansknecht how to look inside to write proper header file for C?
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