Crates.io | rthrift |
lib.rs | rthrift |
version | 0.11.0-git-cf7ba4ca |
source | src |
created_at | 2018-02-23 17:00:34.60867 |
updated_at | 2018-02-24 16:44:03.00097 |
description | Rust bindings for the Apache Thrift RPC system |
homepage | https://twitter.com/@xlyr_cs |
repository | |
max_upload_size | |
id | 52555 |
size | 273,607 |
cargo install
This method support over Rust 1.7. :
cargo install rthrift
Clone the repository git clone https://github.com/okanon/rthrift.git
cd rthrift; cargo build --release
. The binary will now be in ./target/release/
Add the binary to your PATH
. This can be done by moving it to a directory already in your PATH
(i.e. /usr/local/bin
) or by adding the ./target/release/
directory to your PATH
This crate implements the components required to build a working Thrift server and client. It is divided into the following modules:
The modules are layered as shown. The generated
layer is code generated by the
Thrift compiler's Rust plugin. It uses the components defined in this crate to
serialize and deserialize types and implement RPC. Users interact with these
types and services by writing their own code on top.
+-----------+
| app dev |
+-----------+
| generated | <-> errors/results
+-----------+
| protocol |
+-----------+
| transport |
+-----------+
Add thrift = "x.y.z"
to your Cargo.toml
, where x.y.z
is the version of the
Thrift compiler you're using.
Full Rustdoc
Bug reports and PRs are always welcome! Please see the Thrift website for more details.
Thrift Rust support requires code in several directories:
compiler/cpp/src/thrift/generate/t_rs_generator.cc
: binding code generatorlib/rs
: runtime librarylib/rs/test
: supplemental teststutorial/rs
: tutorial client and servertest/rs
: cross-language test client and serverAll library code, test code and auto-generated code compiles and passes clippy without warnings. All new code must do the same! When making changes ensure that:
rustc
does does output any warningsclippy
with default settings does not output any warnings (includes auto-generated code)cargo test
is successfulmake precross
and make check
are successfultutorial/bin/tutorial_client
and tutorial/bin/tutorial_server
communicate