15 stable releases (4 major)

✓ Uses Rust 2018 edition

14.0.5 Nov 28, 2019
13.2.0 Sep 13, 2019
13.0.0 Jul 29, 2019
12.2.0 Jul 30, 2019
10.1.0 Feb 13, 2019
Download history 1172/week @ 2019-08-15 1569/week @ 2019-08-22 1426/week @ 2019-08-29 1452/week @ 2019-09-05 1507/week @ 2019-09-12 1606/week @ 2019-09-19 1241/week @ 2019-09-26 1391/week @ 2019-10-03 1139/week @ 2019-10-10 1446/week @ 2019-10-17 3363/week @ 2019-10-24 3741/week @ 2019-10-31 3662/week @ 2019-11-07 3237/week @ 2019-11-14 3204/week @ 2019-11-21

9,328 downloads per month
Used in 11 crates (4 directly)

MIT license

135KB
3.5K SLoC

jsonrpc-ws-server

WebSockets server for JSON-RPC 2.0.

Documentation

Example

Cargo.toml

[dependencies]
jsonrpc-ws-server = "14.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
~207K SLoC