Protobuf 3 for C

77 views
Skip to first unread message

Luke Galea

unread,
Oct 30, 2020, 6:45:12 AM10/30/20
to Protocol Buffers
I'm new to the world of protobuf but am interested in using it with CoAP. Are there protobuf implementations for C language? Since I am coding an embedded system.

Thank you
Luke

Adam Cozzette

unread,
Oct 30, 2020, 12:40:18 PM10/30/20
to Luke Galea, Protocol Buffers
There are a bunch of C implementations but I think the most common ones are upb, protobuf-c, and nanopb.

--
You received this message because you are subscribed to the Google Groups "Protocol Buffers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/d1061405-697a-47b2-a3d8-ac7becf8b347n%40googlegroups.com.

Luke Galea

unread,
Oct 30, 2020, 12:57:32 PM10/30/20
to Adam Cozzette, Protocol Buffers
Amazing thank you.

Perhaps a stupid question, but would you still recommend them since they are not officially supported by Google? (Google released C++ etc. but not C)

Adam Cozzette

unread,
Oct 30, 2020, 1:10:23 PM10/30/20
to Luke Galea, Protocol Buffers
Actually upb is supported by Google, though we have not mentioned it very prominently in our docs. We have mostly used upb as the underlying implementation for other languages like PHP and Ruby, but you could also use it in a plain C codebase.

Luke Galea

unread,
Oct 30, 2020, 3:21:53 PM10/30/20
to Adam Cozzette, Protocol Buffers
Hi Adam,

Great to hear. I didn't see it mentioned in the home webpage for protobuf and made a wrong assumption.

Regards
Luke

Luke Galea

unread,
Nov 2, 2020, 2:44:32 AM11/2/20
to Protocol Buffers
Hi Adam, I am using Segger Embedded Studio for my embedded implementation. Which files can I use instead of including upb as a git repository?

Thank you
Luke

Adam Cozzette

unread,
Nov 2, 2020, 1:21:06 PM11/2/20
to Luke Galea, Protocol Buffers
I'm not sure of the answer to that because I have not worked with upb much myself. You might have to experiment and see which files you need.

Reply all
Reply to author
Forward
0 new messages