capnproto-java | Cap'n Proto in pure Java | Frontend Utils library
kandi X-RAY | capnproto-java Summary
kandi X-RAY | capnproto-java Summary
Cap'n Proto is an extremely efficient protocol for sharing data and capabilities, and capnproto-java is a pure Java implementation.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Calculate a random request based on a given request
- Generate random car
- Read into the buffer
- Read at least the given number of bytes
- Copy the contents from another struct reader
- Writes a boolean field
- Get a TextPointer from a SegmentBuilder
- Initializes a text pointer builder for a given segment
- Get a writable list pointer
- Allocate a WirePointer
- Reads remaining bytes into the buffer
- Sets the data pointer to the given segment
- Set a boolean element at the given index
- Returns the read buffer
- Writes the given ByteBuffer to this OutputStream
- Creates a new TextPointer
- Writes some bytes to the output buffer
- Allocates a segment
- Read a text pointer from a segment
- Creates a DataPointer from a SegmentBuilder
- Handle a search request
- Writes the contents of the specified ByteBuffer into this buffer
- Set up the search result
- Read bytes from the input stream into the specified output buffer
- Reads a data pointer from a segment
capnproto-java Key Features
capnproto-java Examples and Code Snippets
Community Discussions
Trending Discussions on capnproto-java
QUESTION
I have a project requiring the use of Cap'n Proto for Java. I have a Linux system and I've successfully installed the Cap'n Proto schema compiler as described here:
https://capnproto.org/install.html
Now following the installation instructions as described here: https://dwrensha.github.io/capnproto-java/index.html, I can't seem to figure out how to generate the capnpc-java
plugin. The instructions here seem unclear:
You will need to install the latest release of the Cap’n Proto schema compiler. Then, running make should build capnpc-java.
Running make from where? I did that from the $WORKDIR/capnproto-java
directory but that doesn't work.
The other approach I did was to follow the cmake
instructions from from $WORKDIR/capnproto-java/cmake/README.md
but that didn't work either. According to that README.md:
mkdir build
cd build
cmake -DCAPNP_PKG_PATH=[path of Capnproto pkgconfig directory (with capnp.pc)] [path of CMakeLists.txt]
Where I set CAPNP_PKG_PATH
to be the path of the $WORKDIR/capnproto/c++/pkgconfig
directory, and the [path of CMakeLists.txt]
to $WORKDIR/capnproto
, where $WORKDIR
is a directory on my system.
Can anyone help? I'm not an expert on make system, Makefiles, or cmake. Where does the capnpc-java
created? When I do a which capnpc-java
, nothing is showing up (I do however, can successfully which capnp
, which is located in /usr/local/bin/
)
ANSWER
Answered 2018-Aug-11 at 00:19Looks like I figured it out after some trial and error. It's not straightforward from the README, but at the end of the day, I got the capnpc-java
built. This is the approach I did:
- Per https://capnproto.org/install.html, follow the instructions From Git
- Go to
$WORKDIR/capnproto-java/cmake
. Follow the instructions in theREADME.md
inside thatcmake
directory, under Using cmake. - When specifying
-DCAPNP_PKG_PATH
, specify the path from Step 1, but make sure to includecapnp.pc
. For example:cmake -DCAPNP_PKG_PATH=$WORKDIR/capnproto/c++/pkgconfig/capnp.pc $WORKDIR/capnproto/CMakeLists.txt
cd
to$WORKDIR/capnproto
and runmake -j6
cd
to$WORKDIR/capnproto-java
and runmake
capnpc-java
is generated in$WORKDIR/capnproto-java
. Copy this to/usr/local/bin
I'm assuming this works. I haven't run the capnp compile
yet, but at least this answered my original question.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install capnproto-java
You can use capnproto-java like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the capnproto-java component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page