Crates.io | fast-rpc |
lib.rs | fast-rpc |
version | 0.3.0 |
source | src |
created_at | 2020-02-25 15:29:14.644105 |
updated_at | 2020-02-25 15:29:14.644105 |
description | streaming JSON RPC over TCP |
homepage | |
repository | https://github.com/joyent/rust-fast |
max_upload_size | |
id | 212433 |
size | 117,053 |
Fast is a simple RPC protocol used in Joyent's Triton and Manta systems, particularly in the Moray key-value store. This README contains usage notes.
The original implementation is node-fast. This is the rust implementation of the Fast protocol.
This crate includes:
fastserve
, An example Fast server for demo and testingfastcall
, An example command-line tool for making Fast RPC requestsStart the rust Fast server:
$ cargo run --example fastserve
Use the fastcall
example program to invoke the date
RPC method inside the
client:
cargo run --example fastcall -- --args '[]' --method date
The fastcall
program in the node-fast
repo will also work:
$ fastcall 127.0.0.1 2030 date '[]'
{"timestamp":1457475515355,"iso8601":"2016-03-08T22:18:35.355Z"}
Or try the yes
method, an RPC version of yes(1):
$ fastcall 127.0.0.1 2030 yes '[ { "value": { "hello": "world" }, "count": 3 } ]'
{"hello":"world"}
{"hello":"world"}
{"hello":"world"}
Further information is available in the rustdocs. These can be generated locally
by running cargo doc
in the cloned repository.