HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
google
libnop
C++2018–2018
google / libnop · Archived

libnop

libnop: C++ Native Object Protocols

2Distinct people
5Mentions
0Explicit recommenders
579GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

libnop: C++ Native Object Protocols

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour5 dated mentions

Observed mentions: 2018-10-05 21:15:54 UTC to 2018-10-06 18:55:10 UTC.

012018-10-05 21:00:00 UTC to 2018-10-05 22:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 commentsOct 5, 21:002018-10-05 22:00:00 UTC to 2018-10-05 23:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-05 23:00:00 UTC to 2018-10-06 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 00:00:00 UTC to 2018-10-06 01:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 01:00:00 UTC to 2018-10-06 02:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 02:00:00 UTC to 2018-10-06 03:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 03:00:00 UTC to 2018-10-06 04:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-10-06 04:00:00 UTC to 2018-10-06 05:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 05:00:00 UTC to 2018-10-06 06:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 06:00:00 UTC to 2018-10-06 07:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2018-10-06 07:00:00 UTC to 2018-10-06 08:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 6, 07:002018-10-06 08:00:00 UTC to 2018-10-06 09:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 09:00:00 UTC to 2018-10-06 10:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 10:00:00 UTC to 2018-10-06 11:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 11:00:00 UTC to 2018-10-06 12:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 12:00:00 UTC to 2018-10-06 13:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 13:00:00 UTC to 2018-10-06 14:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 14:00:00 UTC to 2018-10-06 15:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 15:00:00 UTC to 2018-10-06 16:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 16:00:00 UTC to 2018-10-06 17:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 17:00:00 UTC to 2018-10-06 18:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2018-10-06 18:00:00 UTC to 2018-10-06 19:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsOct 6, 18:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Oct 5, 21:002018-10-05 21:00:00 UTC2018-10-05 22:00:00 UTC110
Oct 5, 22:002018-10-05 22:00:00 UTC2018-10-05 23:00:00 UTC000
Oct 5, 23:002018-10-05 23:00:00 UTC2018-10-06 00:00:00 UTC000
Oct 6, 00:002018-10-06 00:00:00 UTC2018-10-06 01:00:00 UTC000
Oct 6, 01:002018-10-06 01:00:00 UTC2018-10-06 02:00:00 UTC000
Oct 6, 02:002018-10-06 02:00:00 UTC2018-10-06 03:00:00 UTC000
Oct 6, 03:002018-10-06 03:00:00 UTC2018-10-06 04:00:00 UTC101
Oct 6, 04:002018-10-06 04:00:00 UTC2018-10-06 05:00:00 UTC000
Oct 6, 05:002018-10-06 05:00:00 UTC2018-10-06 06:00:00 UTC000
Oct 6, 06:002018-10-06 06:00:00 UTC2018-10-06 07:00:00 UTC101
Oct 6, 07:002018-10-06 07:00:00 UTC2018-10-06 08:00:00 UTC101
Oct 6, 08:002018-10-06 08:00:00 UTC2018-10-06 09:00:00 UTC000
Oct 6, 09:002018-10-06 09:00:00 UTC2018-10-06 10:00:00 UTC000
Oct 6, 10:002018-10-06 10:00:00 UTC2018-10-06 11:00:00 UTC000
Oct 6, 11:002018-10-06 11:00:00 UTC2018-10-06 12:00:00 UTC000
Oct 6, 12:002018-10-06 12:00:00 UTC2018-10-06 13:00:00 UTC000
Oct 6, 13:002018-10-06 13:00:00 UTC2018-10-06 14:00:00 UTC000
Oct 6, 14:002018-10-06 14:00:00 UTC2018-10-06 15:00:00 UTC000
Oct 6, 15:002018-10-06 15:00:00 UTC2018-10-06 16:00:00 UTC000
Oct 6, 16:002018-10-06 16:00:00 UTC2018-10-06 17:00:00 UTC000
Oct 6, 17:002018-10-06 17:00:00 UTC2018-10-06 18:00:00 UTC000
Oct 6, 18:002018-10-06 18:00:00 UTC2018-10-06 19:00:00 UTC101

What Hacker News says

5 sources
The table approach is fairly flexible. Both Protos and FlatBuffers do more or less functionally similar things. What specific deficiency do you see? Take a look at the binary format spec: https://github.com/google/libnop/blob/master/docs/format.md The format is designed specifically to provide enough structural information that the binary format can be parsed without knowing the original structure definitions. This makes it easy to write a binary-to-string converter than can grok any payload with minimal complexity. Message observability was a primary goal during development.
In Libnop: C++ Native Object Protocols
Since you mention it, check out the experimental RPC support: https://github.com/google/libnop/blob/master/examples/interf... https://github.com/google/libnop/blob/master/include/nop/rpc... I haven't documented it yet since it's not fully baked, but it's quite functional nonetheless. I have a working prototype of RPC over USB between a host PC and a Cortex-M micro controller. The ability to define constexpr dispatch tables is very convenient in a micro controller environment.
In Libnop: C++ Native Object Protocols
Thanks for considering using libnop! This library works well in an embedded context. I've personally used it on Cortex-M class micro controller firmware. The serializer/deserializer does not require dynamic memory allocation. Whether or not dynamic allocation happens depends on how you use the library. If you avoid using data types that perform dynamic allocation (e.g. std::vector) and use (or write) Reader/Writer types that use static memory (e.g. nop::BufferReader/nop::BufferWriter) then you should be fine. There are some nice tricks you can use to permit protocols that have convenient dynamic containers on the host and static versions on the embedded device: https://github.com/google/libnop/blob/master/docs/getting-st... https://github.com/google/libnop/blob/master/docs/getting-st... https://github.com/google/libnop/blob/master/example
Read the rest
s/shared... Endianness is assumed to be little because the vast majority of hardware is little endian. There are utilities to convert here: https://github.com/google/libnop/blob/master/include/nop/uti... These are not currently used by the Reader and Writer types included with libnop for efficiency, but are available for you to use in your own Reader and Writer types if you really need it. Floating point is a much stickier problem due to lack of standardization across hardware. The library does not address this automatically and just packs floating point types in machine order. However, the library provides tools to help address the issue. One approach that works well is to use a fixed point representation for the wire type -- a value wrapper type is convenient for automating this: https://github.com/google/libnop/blob/master/docs/getting-st... See the Fixed template in the example. This is especially handy if you have a micro controller without floating point support or you want to minimize the size of the payload at the cost of range and/or precision. The library has a complete suite of tests and 97.9% line coverage according to GCOV, with particular attention to conditional and error paths. We use the library for a few internal embedded prototypes. I have not tracked its usage outside of Google since its recent release. Best, C
In Libnop: C++ Native Object Protocols

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.