5 stable releases

✓ Uses Rust 2018 edition

12.0.0 Jun 4, 2019
11.0.0 Apr 5, 2019
10.1.0 Feb 13, 2019
10.0.1 Jan 31, 2019

#43 in WebSocket

Download history 760/week @ 2019-02-19 574/week @ 2019-02-26 851/week @ 2019-03-05 792/week @ 2019-03-12 854/week @ 2019-03-19 758/week @ 2019-03-26 563/week @ 2019-04-02 640/week @ 2019-04-09 470/week @ 2019-04-16 599/week @ 2019-04-23 490/week @ 2019-04-30 732/week @ 2019-05-07 592/week @ 2019-05-14 516/week @ 2019-05-21 413/week @ 2019-05-28

2,667 downloads per month
Used in 7 crates (1 directly)

MIT license

127KB
3.5K SLoC

jsonrpc-ws-server

WebSockets server for JSON-RPC 2.0.

Documentation

Example

Cargo.toml

[dependencies]
jsonrpc-ws-server = "12.0"

main.rs

use jsonrpc_ws_server::*;
use jsonrpc_ws_server::jsonrpc_core::*;

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

	let server = ServerBuilder::new(io)
		.start(&"0.0.0.0:3030".parse().unwrap())
		.expect("Server must start with no issues");

	server.wait().unwrap()
}

lib.rs:

WebSockets server.

Dependencies

~9MB
~170K SLoC