I've published a second release of MIT licensed steem-client-rs client which improves module apis, adds proper exception handling, better testing and latest cargo packages update.
How to use
Steem-client-rs hasn't been graduated to crates.io yet, so you'll need to use a git dependency.
[dependencies]
steem-client = { git = "https://github.com/cyberpunk-ventures/steem-client-rs" }
Example code
extern crate steem_client;
use steem_client::*;
let api = steem_client::SteemApi::DatabaseApi;
let api_method = "get_dynamic_global_properties".to_string();
let args = vec![];
let response: Result<serde_json::Value, SteemError> = steem_client::call(api, api_method, args);
response["result"]["head_block_number"].as_u64().unwrap() > 10000000; // true
My Rust experience is limited so I'm sure the code is sub-optimal. Nevertheless, the module works and tests pass. I will be improving the library as I gain deeper understanding of idiomatic Rust code.
About Rust
Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. It was names as "most loved" programming language by developers in annual Stack Overflow survey, so make sure to check it out!
Roadmap
- Implement futures
- Investigate json_rpc crate from eth_core implementation in Ethereum's Parity
- Add more utility functions
- Investigate WS and evented approach
- Add more response structs and types for different JSONRPC apis and methods
- More tests and docs
oh i love Rust, not that im good with it but been learning
:D same here, @kingscrown
thank
Good work!
great post :)
thanks :)