Giter VIP home page Giter VIP logo

ecapnp's Introduction

ecapnp

Cap'n Proto library for Erlang.

NOTICE: This is work-in-progress. Feedback appreciated.

Current Status

  • Compiler

    The compiler produces standalone schema modules to either compiled .beam or in .erl source form.

  • API

    The API are still quite verbose, and subject to change.

  • Serialization support

    Most constructs should work. There are a few corner cases I haven't tested yet. Packed messages are also supported.

  • RPC support

    The RPC support is shaping up, aiming for a level 1 implementation to be ready soon. The calculator sample from capnproto has been successfully ported to erlang.

  • Tests

    In addition to the eunit tests, there are now also PropEr tests to cover more corner cases. I find that they complement each other well, as unit tests are easier to write for a specific slightly contrived scenario, while the property tests are well suited for a general approach covering as many different inputs as possible.

  • Future work

    At this point, the goal is to get everything working properly. The next step will be to re-factor it into beautiful code/design, and after that, improvements for efficiency and performance.

Note

In order for ecapnp to work properly, ecapnp has to be on the Erlang lib path (i.e. ERL_LIBS), and ecapnp/bin/capnpc-erl needs to be on your PATH.

Try it:

cd ../path/to/ecapnp
export ERL_LIBS=$(dirname $(pwd))
export PATH=$PATH:$(pwd)/bin
make samples
capnpc -oerl .../my_schema.capnp

This will (given that everything is working as intended) produce a .../my_schema_capnp.beam file.

A few noteworthy options you can set in the environment are:

  • ECAPNP_TO_ERL - Save erlang source of compiled schema to path (relative to outdir).

  • ECAPNP_NO_BEAM - Do not compile to beam code.

  • ECAPNP_LOAD_BEAM - Load compiled beam code on the running node. Useful in case you compile files programatically, rather than using the capnp plugin.

(these options should be available as argument when compiling the code generator request.. alas, that is yet to be implemented)

Web Site

Head over to ecapnp.astekk.se for documentation etc.

ecapnp's People

Contributors

bitdeli-chef avatar kaos avatar

Watchers

 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.