gramseyer / xdrpp Goto Github PK
View Code? Open in Web Editor NEWThis project forked from xdrpp/xdrpp
Home Page: http://xdrpp.github.io/xdrpp/index.html
License: Other
This project forked from xdrpp/xdrpp
Home Page: http://xdrpp.github.io/xdrpp/index.html
License: Other
# XDRPP with a Python binding This gives an xdr binding usable in python. It's primarily a wrapper around the functionality of the c++ version of xdrpp. In particular, this modification to xdrc generates python classes with the structure laid out in the xdr file, and provides an easy way to save/load/modify these structures. There's no meddling with individual bytes, and these structs inherit the typesafety/validation logic of the underlying xdrpp c++ code. It does not implement every piece of functionality (only what I have needed), and namespaces are only partially implemented. If you happen to use the library and need something that's missing, let me know and I'll add it. The big thing that's missing is running as an rpc server. Only synchronous rpc clients are implemented. I also have not implemented pointers (optionals). The interface is not always super pythonic (esp. strings and arrays). Suggestions welcome. # Build To use, each xdr file becomes three cython files. abc.x becomes abc_xdr.pyx, abc_xdr.pxd, and abc_includes.pxd To build, run ./xdrc --pyx or ./xdrc --pxd or ./xdrc --pxdi , respectively. Limitations on how cython deals with references means that unions need a few extra methods in the .hh file. .hh files should also therefore be generated using ./xdrc --hh --hhpy (i.e. add the --hhpy flag) Designed for python3.8. YMMV on other versions of python. To build, generate the above cython files and .hh files, then cythonize them into an importable python module. An example build script is included in setup.py (this should be copied into the directory where the cython files are built). Example usage: 'python3 setup.py build_ext --inplace (-j 4) --pyx_files="$(PYX_FILES)"', where $(PYX_FILES) lists only the .pyx files. This will output a number of python modules to the local directory. Python shells or scripts run from this directory will be able to import modules (filename)_xdr, i.e. 'from abc_xdr import *' . # XDRPP README: # To build from a release that already has a configure file: ./configure make # Documentation Documentation is available on-line at the project home page, <http://xdrpp.github.io/xdrpp/>. To generate and view a local copy of the documentation, run: doxygen xdg-open doc/html/index.html Finally, if you have neither an Internet connection nor doxygen, a copy of the documentation can also be found in the `gh-pages` branch of the repository, which you can access as: git archive --prefix=www/ origin/gh-pages | bsdtar xf - xdg-open www/index.html # Building To build after a git checkout that doesn't have ./configure, run: ./autogen.sh ./configure make As is traditional, the software can be installed with make install # To enable the cereal test You need cereal in the top directory (before running `./configure`), which you can get by running: git clone https://github.com/USCiLab/cereal.git (Or make cereal a symlink to an already checked out copy.) # To enable autocheck tests You need autocheck in the top directory. Run: git clone https://github.com/thejohnfreeman/autocheck.git (Or make autocheck a symlink to an already checked out copy.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.