4 stable releases

✓ Uses Rust 2018 edition

11.0.0 Apr 5, 2019
10.1.0 Feb 13, 2019
10.0.1 Jan 31, 2019
Download history 8/week @ 2019-01-25 373/week @ 2019-02-01 571/week @ 2019-02-08 661/week @ 2019-02-15 627/week @ 2019-02-22 810/week @ 2019-03-01 796/week @ 2019-03-08 802/week @ 2019-03-15 781/week @ 2019-03-22 618/week @ 2019-03-29

2,029 downloads per month
Used in 5 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 = "11.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
~164K SLoC