XDR encoded data structures (RFC 4506) in Elixir
XDR provides:
- base XDR type modules
- compound XDR type modules for defining your own custom types
- built-in validation, encoding and decoding functions for each base and compound/custom module
Install from Hex.pm:
def deps do
[{:xdr, "~> 0.1.2"}]
end
# base type modules
# can be used as is
XDR.Type.Int
XDR.Type.Uint
XDR.Type.Bool
XDR.Type.HyperInt
XDR.Type.HyperUint
XDR.Type.Float
XDR.Type.DoubleFloat
XDR.Type.QuadrupleFloat # not implemented
XDR.Type.Void
# compound type modules
# create your own custom type modules with the `__using__` macro, the options for which are defined within each module
# examples can be found in each module's tests within the `test` directory
XDR.Type.Enum
XDR.Type.FixedOpaque
XDR.Type.VariableOpaque
XDR.Type.String
XDR.Type.FixedArray
XDR.Type.VariableArray
XDR.Type.Struct
XDR.Type.Union
XDR.Type.Const
XDR.Type.Optional
Version | Change Summary |
---|---|
v0.1.2 | negative integers in Enums |
v0.1.1 | minor bugfix |
v0.1.0 | initial release |
- Fork it https://github.com/your_username/xdr/fork
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
- Sunny G - @sunny-g
- Bryan Joseph - @bryanjos
MIT