Crates.io | tetsy-jsonrpc-stdio-server |
lib.rs | tetsy-jsonrpc-stdio-server |
version | 15.1.0 |
source | src |
created_at | 2021-03-01 07:58:42.13444 |
updated_at | 2021-03-13 03:49:51.651371 |
description | Tetsy STDIN/STDOUT server for JSON-RPC |
homepage | https://core.tetcoin.org |
repository | https://github.com/tetcoin/tetsy-jsonrpc |
max_upload_size | |
id | 362114 |
size | 24,019 |
STDIN/STDOUT server for JSON-RPC 2.0. Takes one request per line and outputs each response on a new line.
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();
}