Home > {{category.CategoryName}} > Capn Proto C Serialization
Capn Proto C Serialization Serialization App

Capn Proto C Serialization

by Sandstorm

Serialization/RPC system
Helps with: Serialization
Similar to: Protocol Buffers App Protobuf-C App Cereal App YAXLib App More...
Source Type: Open
License Types:
MIT
Supported OS:
Languages: CPP

What is it all about?

The Cap’n Proto C++ runtime implementation provides an easy-to-use interface for manipulating messages backed by fast pointer arithmetic.

Key Features

* You can implicitly cast any compiled Cap’n Proto struct reader/builder type directly to DynamicStruct::Reader/DynamicStruct::Builder. Similarly with List and DynamicList, and even enum types and DynamicEnum. Finally, all valid Cap’n Proto field types may be implicitly converted to DynamicValue. * You can load schemas dynamically at runtime using SchemaLoader (capnp/schema-loader.h) and use the Dynamic API to manipulate objects of these types. MessageBuilder and MessageReader have methods for accessing the message root using a dynamic schema. * While SchemaLoader loads binary schemas, you can also parse directly from text using SchemaParser (capnp/schema-parser.h). However, this requires linking against libcapnpc (in addition to libcapnp and libkj) – this code is bulky and not terribly efficient. If you can arrange to use only binary schemas at runtime, you’ll be better off. * Unlike with Protobufs, there is no “global registry” of compiled-in types. To get the schema for a compiled-in type, use capnp::Schema::from(). * Unlike with Protobufs, the overhead of supporting reflection is small. Generated .capnp.c++ files contain only some embedded const data structures describing the schema, no code at all, and the runtime library support code is relatively small. Moreover, if you do not use the dynamic API or the schema API, you do not even need to link their implementations into your executable. * The dynamic API performs type checks at runtime. In case of error, it will throw an exception. If you compile with -fno-exceptions, it will crash instead. Correct usage of the API should never throw, but bugs happen. Enabling and catching exceptions will make your code more robust. * Loading user-provided schemas has security implications: it greatly increases the attack surface of the Cap’n Proto library. In particular, it is easy for an attacker to trigger exceptions. To protect yourself, you are strongly advised to enable exceptions and catch them.


Pricing

Yearly
Monthly
Lifetime
Free
Freemium
Trial With Card
Trial No Card
By Quote

Description

free

Alternatives

View More Alternatives

View Less Alternatives

Top DiscoverSDK Experts

User photo
60
Billy Joel Ranario
Full Stack Web Developer and Article Writer
GUI | Data Handling and 31 more
View Profile
User photo
20
Ron Barak
Python/Unix/System developer
Data Handling | Algorithms and 15 more
View Profile
User photo
20
ahmedxp kh
Ahmedxp PC ENG
Multimedia | Hardware and RT and 123 more
View Profile
User photo
20
Robinson Marquez
Full Stack Developer
GUI | Data Handling and 22 more
View Profile
Show All

Interested in becoming a DiscoverSDK Expert? Learn more

X

Compare Products

Select up to three two products to compare by clicking on the compare icon () of each product.

{{compareToolModel.Error}}

Now comparing:

{{product.ProductName | createSubstring:25}} X
Compare Now