Skip to content

floodlight/xdr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XDR Compiler

Given an XDR specification (*.x), this program generates code for a target language.

Usage

Assuming a file myxdr.x with this content:

struct foo {
    int a;
    string b<>;
};

You can generate Python code like this:

xdr -t python -o myxdr myxdr.x

Then in a Python program:

import myxdr
x = myxdr.foo(a=1, b="bar")
data = x.pack()
y = myxdr.foo.unpack(data)
assert x == y

References

About

XDR code generator with backends for various languages

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published