Awesome
A better way to define schemas for your JSON.
Introduction
If you want to take the system for a spin, please go to https://reproto.github.io.
Reproto is:
- A compiler capable of generating code for various languages.<br /> try it out – documentation
- A language server providing first-class integration with a large number of editors.<br /> documentation
- A custom interface description language that permits describing the schema of JSON and services in a concise, easy to understand way.<br /> documentation
- Early and extensive soundness checking, with excellent error handling. We catch schema issues before you know that you have them.<br /> ui tests
- A derive command, capable of deriving schemas directly from JSON.<br /> try it out – documentation.
- A semantic version checker which verifies that modifications to schemas do not violate semantic versioning.<br /> documentation
- A build system with a package manager using build manifests, giving you all the control you need to integrate reproto into your project.<br /> documentation
- A rich, markdown-based documentation generator.<br /> documentation
These things combined support an ecosystem where schemas can be maintained and shared across many teams.
You can install a binary version of reproto by running:
curl https://raw.githubusercontent.com/reproto/reproto/master/install.sh -sSf | bash
Note: This project is in an early stage. Things will change a lot. Please take it for a spin, but avoid building large repositories of schemas for now.
Getting Started
- See the documentation for an overview of how the reproto language and its build manifest works.
- See examples for some example specifications and projects.
- See the integration tests for even more examples on how protocol specifications can be used.
- See CHANGELOG.md for past and coming changes.
Helping Out
You want to help out? Great!
You might want to start on issues marked with good first issue. If you have a support for a programming language that you feel is lacking, please help out with language support.
For any of these, just poke the issue with a quick I want to do this!
.
If mentoring instructions are lacking, they will be made available as soon as possible.
Also make sure to join our Gitter channel.
Language Support
Language | Tracking Issue | JSON | gRPC | HTTP/1.1* |
---|---|---|---|---|
Java | ✔️ | ✔️ | ✔️ test | |
Python | ✔️ | ✖️ | ✔️ test | |
C# | ✔️ | ✖️ | ✖️ | |
Rust | ✔️ | ✖️ | ✔️ test | |
JavaScript | ✔️ | ✖️ | ✖️ | |
Swift | ✔️ | ✖️ | ✖️ | |
Go | ✔️ | ✖️ | ✖️ | |
Dart | #61 | ✔️ | ✖️ | ✖️ |
*: HTTP/1.1 support is actively being outlined in #2
Generating Documentation
reproto
can generate rich markdown-based documentation from your specifications.
Go to https://reproto.github.io/reproto/doc-examples/ to see what this documentation looks like.
These have been generated from the examples project using tools/update-doc-examples.
Installing from Source
Make sure you have gotten started with Rust.
Initialize submodules:
git submodule update --init
Pack syntax highlighting and themes:
cargo build-syntax
cargo build-themes
Build and install the CLI.
This will install reproto
into ~/.cargo/bin
, make sure it is in your PATH:
cargo install --path cli reproto
Tools
- reproto-vim, a VIM plugin that provides syntax highlighting.
- reproto-maven, Maven plugin that integrates reproto into the build lifecycle of a maven project.
- reproto-vscode, a visual studio code extension providing syntax highlighting and in-editor error diagnostics.
Testing
This project includes an extensive set of integration tests.
See cargo it --help
for documentation on what can be done.
Suites are fast tests which compiles a given set of rules, and compares with expected output stored in this repository.
cargo it --suites
To run UI tests:
cargo it --ui
Projects are complete project tests. These are projects written for various programming languages, and are generally harder to build.
cargo it --projects
To run all tests, do:
cargo it --all
For more information, run make help
.
Testing Rust Projects
Install Rust: https://rustup.rs
Testing Dart Projects
Install Dart SDK: https://dart.dev/get-dart
Testing Python Projects
Install Python.
All python testing requires requests
to be installed.