GithubHelp home page GithubHelp logo

commaai / c-capnproto Goto Github PK

View Code? Open in Web Editor NEW

This project forked from opensourcerouting/c-capnproto

1.0 5.0 12.0 1.69 MB

C library/compiler for the Cap'n Proto serialization/RPC protocol

License: MIT License

Makefile 0.34% Cap'n Proto 8.81% C 80.73% C++ 9.89% M4 0.24%

c-capnproto's Introduction

capnpc-c

This is a C plugin for Cap'n Proto, an efficient protocol for sharing data and capabilities.

This is only the plugin, to properly make use of it you need to download, build and install capnpc and then build and install this project and then you can utilize it as:

capnpc compiler/test.capnp -oc

Build Status

status

This is a merge of 3 forks of James McKaskill's great work, which has been untouched for a while:

usage

The compiler directory contains the C language plugin (capnpc-c) for use with the capnp tool: https://capnproto.org/capnp-tool.html.

capnp will by default search $PATH for capnpc-c - if it's on your PATH, you can generate code for your schema as follows:

$ capnp compile -o c myschema.capnp

Otherwise, you can specify the path to the c plugin:

$ capnp compile -o ./capnpc-c myschema.capnp

capnp generates a C struct that corresponds to each capn proto struct, along with read/write functions that convert to/from capn proto form.

TBD whether it will make sense in the future to provide accessor functions for struct members, rather than converting entire structs.

building on linux

git clone https://github.com/opensourcerouting/c-capnproto
cd c-capnproto
git submodule update --init --recursive
autoreconf -f -i -s 
./configure
make
make check

c-capnproto's People

Contributors

baruch avatar eqvinox avatar espes avatar gs640 avatar jmckaskill avatar johandc avatar kylemanna avatar liamstask avatar lilith avatar mikegarts avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.