Using Cap'n Proto for FFI

213 views
Skip to first unread message

Jonah Beckford

unread,
Aug 25, 2023, 11:32:32 PM8/25/23
to Cap'n Proto
I have an implementation of FFI (foreign function interface) that uses Cap n' Proto. From a Cap n' Proto perspective it is analogous to Cap n' Proto RPC but "solves" sharing in-process objects between different languages rather than distributed messaging. You can read the announcement at https://discuss.ocaml.org/t/ann-new-project-old-technique-dksdk-ffi-ocaml/12909 (the OCaml programming language discussion boards) if you'd like.

All the Cap n' Proto language bindings (ex. capn-ocaml) are important in the "DkSDK FFI" framework, but the most critical is the C language binding. Why? Plain old C is the best language to implement FFI that works across many languages. However, c-capnproto is unmaintained (https://github.com/opensourcerouting/c-capnproto/issues/55). So I forked c-capnproto, made several fixes, added support for MSVC and improved the test/build matrix. That fork is available at https://gitlab.com/dkml/ext/c-capnproto. If no one has any objections it may be best to list that active fork as the C implementation on https://capnproto.org/otherlang.html.

Thanks! Jonah

Toyam Cox

unread,
Aug 28, 2023, 6:27:50 PM8/28/23
to Jonah Beckford, Cap'n Proto
I just want to say this is very cool, thank you.

--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/10a9d02a-1073-408c-acbb-7a30717f3400n%40googlegroups.com.


--
- Toyam

Kenton Varda

unread,
Sep 6, 2023, 5:57:34 PM9/6/23
to Jonah Beckford, Cap'n Proto
Hi Jonah,

Sorry for the very slow reply. This looks cool!

Thanks for taking over maintaining the C implementation -- I've added a link to the web site.

-Kenton

--
Reply all
Reply to author
Forward
0 new messages