Questions tagged [capnproto]

Cap'n Proto is a zero-copy data interchange format described by a schema language not unlike Protobuf, and an associated capability-based RPC system.

Cap'n Proto is a zero-copy serialization format described by a schema language not unlike Protobuf and an associated capability-based RPC system.

99 questions
0
votes
1 answer

How to handle more than one cap'n proto RPC service in the same socket?

I'm new with RPC protocols so probably my question may have some conceptual errors. I'm trying to write a higher level library for cap'n proto for writing both servers/clients, something like tonic but over cap'n proto instead protobuf and runtime…
al3x
  • 589
  • 1
  • 4
  • 16
0
votes
0 answers

Lwt error sending messages with capnproto

I am using capnproto to send messages between several nodes. Each node can both send and receive messages from all others. The relevant code looks like this: main.ml: let start_node id nodes = Lwt_main.run begin let listen_address = `TCP…
Melkor
  • 779
  • 1
  • 12
  • 29
0
votes
1 answer

Cap'n Proto unaligned data error while trying to send&receive serialized object over ZeroMQ pub-sub socket (C++)

I am using Cap'n Proto with ZeroMQ for interprocess communication in my C++ project. I have a sender and a receiver, and I am sending a Cap'n Proto message from the sender to the receiver via ZeroMQ. I am getting the following error when I try to…
0
votes
1 answer

ZeroMQ pub-sub socket receiving error of a serialized message object using cap'n proto (C++)

I am using ZeroMQ and Cap'n Proto to send serialized messages between two processes, but I am getting the following error when I try to receive the message on the receiving end: terminate called after throwing an instance of 'kj::ExceptionImpl' …
0
votes
1 answer

Can't figure out why helper function for rust-capnp holds borrow reference too long

I'm trying to create a helper method to rust-capnp that takes a initialization function and returns a Vec that contains a serialized version of the message. fn construct_serialized_capnp_into<'a, 'b, A, T, F>( mut builder:…
Vitali
  • 3,411
  • 2
  • 24
  • 25
0
votes
1 answer

How to serve multiple interfaces in Capnproto

In the calculator example, I have added a new interface in the capnp file like below: interface Main { getCalculator @0 () -> (calculator :Calculator); } My objective is to make use of multiple interfaces through one implementation Main. How can…
Shiv
  • 1,912
  • 1
  • 15
  • 21
0
votes
1 answer

Cap'n proto link error undefined symbol capnp::MessageBuilder::getRootInternal() arm

i am trying to build and link cap'n proto library using arm-linux-gnueabihf-ld and receive such link errors. also i am building it on docker and snapcraft. arm-linux-gnueabihf-ld: error: undefined symbol: capnp::MessageBuilder::getRootInternal() >>>…
0
votes
1 answer

Failed to build capnproto on ARM, test failed

I am trying to build capnproto library for linux arm machine using arm-linux-gnueabihf-clang++ and it builds correctly but because tests is a part of a build it fails to finish build because i am building it on x64 machine for arm platform and capn…
0
votes
1 answer

How to install specific version of Cap'n Proto (v0.8.0)?

sudo apt install capnproto This installs v0.7.0 in my ubuntu 20.04. However, i require v0.8.0 to be installed. Also, i need v0.6.1 to be installed additionally for backward compatibility. Any solution for these two cases ?
user13553961
  • 33
  • 2
  • 7
0
votes
1 answer

How to read capnp schema const value at runtime using SchemaParser?

given the following dummy schema test.capnp: struct Person { const type :Text = "person.type.example"; version @0 :UInt32; name @1 :Text; } At runtime, how can we read the default const value from a schema struct (i.e the…
TheoretiCAL
  • 19,461
  • 8
  • 43
  • 65
0
votes
1 answer

Failing to compile capnproto under visual studio 2019

I am following the instructions from the link below for compiling capnproto under visual studio 2019. https://capnproto.org/install.html When I try to build the solution "ALL_BUILD" in step 6, it fails. The first error that I see in the log is that…
Sanjeev Singh
  • 141
  • 1
  • 10
0
votes
1 answer

Pass context through composed promises in KJ

Playing with the KJ library, I wrote a small TCP servers that reads a "PING" and responds a "PONG". I managed to compose the promises like this: char buffer[4]; kj::Own clientStream; addr->listen()->accept() .then([&buffer,…
JonasVautherin
  • 7,297
  • 6
  • 49
  • 95
0
votes
2 answers

How to deserialize a std::string to a concrete message in Cap'n Proto C++?

I need to decode a message from a std::string object. I can see how to do this in Java by using a ByteBuffer, but I failed to find a simple C++ equivalent. More precisely, how to implement this? const std::string serialized_data = ...; //…
user2595776
  • 304
  • 1
  • 10
0
votes
1 answer

Define a type alias in Cap'n Proto

I do not understand how one would export a type alias in Cap'n Proto. The simplest example I can think of is a point cloud. Suppose we have a schema such as struct Point { x @0: Float32 = 0; y @1: Float32 = 0; } and then I want to also…
bremen_matt
  • 6,902
  • 7
  • 42
  • 90
0
votes
2 answers

How to access serialized data of Cap'n'Proto?

I'm working with Cap'n'Proto and my understanding is there is no need to do serialization as it's already being done. So my question is, how would I access the serialized data and get it's size so that I can pass it in as a byte array to another…
Ender
  • 1,652
  • 2
  • 25
  • 50