19 stable releases (5 major)

new 15.0.0 Sep 18, 2020
14.2.0 Jun 3, 2020
14.1.0 Apr 14, 2020
14.0.6 Feb 7, 2020
10.1.0 Feb 13, 2019

#11 in WebSocket

Download history 5505/week @ 2020-06-01 5550/week @ 2020-06-08 5735/week @ 2020-06-15 5036/week @ 2020-06-22 5090/week @ 2020-06-29 5309/week @ 2020-07-06 5153/week @ 2020-07-13 5493/week @ 2020-07-20 5779/week @ 2020-07-27 5903/week @ 2020-08-03 5694/week @ 2020-08-10 4895/week @ 2020-08-17 5444/week @ 2020-08-24 4578/week @ 2020-08-31 5967/week @ 2020-09-07 6715/week @ 2020-09-14

23,592 downloads per month
Used in 24 crates (5 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.2"

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

~9.5MB
~215K SLoC