11 stable releases (4 major)

✓ Uses Rust 2018 edition

14.0.0 Oct 9, 2019
13.2.0 Sep 13, 2019
13.1.0 Aug 26, 2019
13.0.0 Jul 29, 2019
10.1.0 Feb 13, 2019
Download history 780/week @ 2019-06-26 807/week @ 2019-07-03 932/week @ 2019-07-10 797/week @ 2019-07-17 793/week @ 2019-07-24 908/week @ 2019-07-31 859/week @ 2019-08-07 1114/week @ 2019-08-14 1459/week @ 2019-08-21 1487/week @ 2019-08-28 1472/week @ 2019-09-04 1473/week @ 2019-09-11 1635/week @ 2019-09-18 1297/week @ 2019-09-25 1351/week @ 2019-10-02

5,106 downloads per month
Used in 10 crates (2 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

~8.5MB
~187K SLoC