tetsy-jsonrpc-stdio-server

Crates.iotetsy-jsonrpc-stdio-server
lib.rstetsy-jsonrpc-stdio-server
version15.1.0
sourcesrc
created_at2021-03-01 07:58:42.13444
updated_at2021-03-13 03:49:51.651371
descriptionTetsy STDIN/STDOUT server for JSON-RPC
homepagehttps://core.tetcoin.org
repositoryhttps://github.com/tetcoin/tetsy-jsonrpc
max_upload_size
id362114
size24,019
Marlon Hanks (marlonhanks)

documentation

https://docs.rs/tetsy-jsonrpc-stdio-server/

README

tetsy-jsonrpc-stdio-server

STDIN/STDOUT server for JSON-RPC 2.0. Takes one request per line and outputs each response on a new line.

Documentation

Example

Cargo.toml

[dependencies]
tetsy-jsonrpc-stdio-server = "14.2"

main.rs

use tetsy_jsonrpc_stdio_server::ServerBuilder;
use tetsy_jsonrpc_stdio_server::tetsy_jsonrpc_core::*;

fn main() {
	let mut io = IoHandler::default();
	io.add_method("say_hello", |_params| {
		Ok(Value::String("hello".to_owned()))
	});

	ServerBuilder::new(io).build();
}
Commit count: 754

cargo fmt