Fibers and compiling without exceptions

30 views
Skip to first unread message

John Demme

unread,
Oct 10, 2022, 4:36:19 PM10/10/22
to Cap'n Proto
Hi All-

I have a code base which doesn't have exceptions enabled (it's an LLVM code base wherein policy prevents compiling with exceptions). I'd like to use the Cap'n Proto (C++) RPC server but cannot use fibers without exceptions. I know it's possible to compile Cap'n Proto without fibers but I'd rather not require a custom compile for my fellow devs -- I'd rather let them use their system install of capnp. Is this possible?

~John

Kenton Varda

unread,
Nov 25, 2022, 12:11:32 PM11/25/22
to John Demme, Cap'n Proto
Hi John,

Sorry for the very slow response, I've been on leave.

Fibers won't be used unless you explicitly ask for them.

However, regardless of fibers, you cannot use a version of Cap'n Proto compiled with exceptions enabled inside of an application compiled with exceptions disabled. Compiling with -fno-exceptions is essentially an ABI-breaking switch for libcapnp and libkj; you must apply the same flag when building the library itself and the app that uses it.

So, unfortunately, it sounds like you cannot use the system-installed capnp, which is typically built with exceptions enabled.

-Kenton

--
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 capnproto+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/34f283a1-8bf7-4fd8-946f-cbabf4d82bb9n%40googlegroups.com.

John Demme

unread,
Nov 25, 2022, 5:10:49 PM11/25/22
to Kenton Varda, Cap'n Proto
Hi Kenton-

No worries about the delay. And yeah, that's what I figured. Just wanted to check the I wasn't missing anything.

Thanks!

~John
Reply all
Reply to author
Forward
0 new messages