#json-rpc #ipc #tetsy #server #server-builder #linux

tetsy-jsonrpc-ipc-server

Tetsy IPC server for JSON-RPC

Show the crate…

3 stable releases

15.1.0 Mar 13, 2021
14.2.1 Mar 1, 2021

#10 in #server-builder

32 downloads per month
Used in 26 crates (3 directly)

MIT license

130KB
3.5K SLoC

tetsy-jsonrpc-ipc-server

IPC server (Windows & Linux) for JSON-RPC 2.0.

Documentation

Example

Cargo.toml

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

main.rs

extern crate tetsy_jsonrpc_ipc_server;

use tetsy_jsonrpc_ipc_server::ServerBuilder;
use tetsy_jsonrpc_ipc_server::tetsy_jsonrpc_core::*;

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

	let builder = ServerBuilder::new(io);
	let server = builder.start("/tmp/json-ipc-test.ipc").expect("Couldn't open socket");
	server.wait();
}

lib.rs:

Cross-platform JSON-RPC IPC transport.

Dependencies

~13MB
~224K SLoC