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.0"}]
end
# base type modules
# can be used as is
XDR.Type.Int
XDR.Type.Uint
XDR.Type.Enum
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, options for which are defined within each module
# examples can be found in the module's `tests`
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.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
MIT