8 stable releases (3 major)

✓ Uses Rust 2018 edition

13.0.0 Jul 29, 2019
12.2.0 Jul 30, 2019
12.0.0 Jun 4, 2019
11.0.0 Apr 5, 2019
10.0.1 Jan 31, 2019
Download history 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 679/week @ 2019-06-04 932/week @ 2019-06-11 757/week @ 2019-06-18 798/week @ 2019-06-25 762/week @ 2019-07-02 977/week @ 2019-07-09 768/week @ 2019-07-16 805/week @ 2019-07-23

3,045 downloads per month
Used in 8 crates (1 directly)

MIT license

132KB
3.5K SLoC

jsonrpc-ws-server

WebSockets server for JSON-RPC 2.0.

Documentation

Example

Cargo.toml

[dependencies]
jsonrpc-ws-server = "13.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

~9.5MB
~193K SLoC