{"id":18417367,"url":"https://github.com/stellar/xdrgen","last_synced_at":"2025-04-13T07:49:40.297Z","repository":{"id":26757035,"uuid":"30214896","full_name":"stellar/xdrgen","owner":"stellar","description":"A code generator for XDR","archived":false,"fork":false,"pushed_at":"2025-02-05T20:16:50.000Z","size":854,"stargazers_count":24,"open_issues_count":24,"forks_count":50,"subscribers_count":34,"default_branch":"master","last_synced_at":"2025-04-04T07:02:51.413Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stellar.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-02-02T23:40:40.000Z","updated_at":"2025-03-17T15:43:55.000Z","dependencies_parsed_at":"2023-09-28T04:41:09.966Z","dependency_job_id":"ef90cb27-7420-405c-be31-73d4e2de2b22","html_url":"https://github.com/stellar/xdrgen","commit_stats":{"total_commits":314,"total_committers":25,"mean_commits":12.56,"dds":0.4394904458598726,"last_synced_commit":"b7bc57ecdd277c9575930d3e17c12dfaa76655fc"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fxdrgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fxdrgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fxdrgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stellar%2Fxdrgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stellar","download_url":"https://codeload.github.com/stellar/xdrgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T04:09:04.489Z","updated_at":"2025-04-13T07:49:40.273Z","avatar_url":"https://github.com/stellar.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xdrgen\n\n[![Build Status](https://travis-ci.org/stellar/xdrgen.svg)](https://travis-ci.org/stellar/xdrgen)\n[![Code Climate](https://codeclimate.com/github/stellar/xdrgen/badges/gpa.svg)](https://codeclimate.com/github/stellar/xdrgen)\n\n`xdrgen` is a code generator that takes XDR IDL files (`.x` files) as specified\nin [RFC 4506](http://tools.ietf.org/html/rfc4506.html) and spits code out in\nvarious languages.\n\n`xdrgen` requires ruby 2.1 or later to run.\n\n## Status\n\nXdrgen is a very early project.  Aside from the test fixtures in\n[spec/fixtures](spec/fixtures), the only .x files that have been thrown at it\nare the .x files used for the\n[stellar-core project](https://github.com/stellar/stellar-core).\n\nXdrgen presently supports these output languages: ruby, javacript, java,\ngolang, elixir and Python:\n\n- ruby: complete support\n- javascript: complete support\n- java: complete support\n- golang: currently using a fork of go-xdr, but has complete support\n- rust: support is experimental. Default arms and floats are not supported.\n- elixir: support is experimental as the SDK is in early development. Generated\n  code requires [:exdr](https://github.com/revelrylabs/exdr) in your deps\n- C#: complete support\n- Python: complete support\n  \nTesting is _very_ sparse, but will improve over time.\n\n## Usage as a binary\n\nXdrgen is a rubygem, compatible with ruby 2.1 or higher\n\n    $ gem install xdrgen\n\nThe command line:\n\n`xdrgen [-o OUTPUT_DIR] [-l LANGUAGE] [-n NAMESPACE] [INPUT_FILES ...]`\n\n### Language Specific Options\n\n### Rust\n\n`--rust-types-custom-str-impl`: Used to specify a comma-separated list of type names that should not have string conversion code generated as it will be provided by custom implementations provided by the developer using the generated code.\n\n## Usage as a library\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'xdrgen'\n```\n\nAnd then execute:\n\n    $ bundle\n\nExample usage:\n\n```ruby\nrequire 'xdrgen'\n\n# create a compilation object, specifying your options\n\nc = Xdrgen::Compilation.new(\n  [\"MyProgram.x\"],\n  output_dir:\"src/generated\",\n  language: :ruby,\n  namespace: \"MyProgram::XDR\",\n  options: {\n    rust_types_custom_str_impl: [],\n    rust_types_custom_jsonschema_impl: [],\n  },\n)\n\n# then run compile\n\nc.compile\n\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/xdrgen/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fxdrgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstellar%2Fxdrgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstellar%2Fxdrgen/lists"}