xdr-codegen

Crates.ioxdr-codegen
lib.rsxdr-codegen
version0.5.2
sourcesrc
created_at2019-09-27 23:10:38.688068
updated_at2022-01-20 15:13:18.077074
descriptionXDR code generation
homepagehttps://github.com/kochavalabs/xdr-codegen
repositoryhttps://github.com/kochavalabs/xdr-codegen
max_upload_size
id168278
size74,902
(mazzaroth-dev)

documentation

README

XDR Codegen

CircleCI

Xdr-codegen is a binary that is used to take the XDR Language Specification and generate source code in various languages. The goal of this is to facilitate the communication of XDR objects across binaries that are written in different languages. Another way to say this is we take .x files and convert them to the appropriate js, go or rust source (protoc for XDR).

Warning: This project was put together to aid us in our development in a short amount of time. There is still more work to be done before xdr-codegen is completely compatible with the XDR Language Specification.

Usage

We currently support code generation for 3 languages: javascript, rust and go. The generated code has the following dependencies:

# Javascript generation
cargo run test.x --language js # | eslint --stdin
# Rust generation
cargo run test.x --language rust # | rustfmt
# Go generation
cargo run test.x --language go # | gofmt
# Commonjs generation
cargo run test.x --language commonjs # | eslint --stdin

License

MIT

Commit count: 142

cargo fmt