I’ve just pushed up an initial version of an XDR serialization library and code generator to crates.io. There are two crates:
xdr-codec, the runtime library which provides serialization for the basic XDR types, and
Unpacktraits which other types can implement, and
xdrgen, which can parse RFC4506 XDR specs (.x files) and generates definitions for the types defined there and implementations of
This is specifically intended to cope with previously defined .x files to make it easy to write Rust code to interoperate with existing protocol definitions.