create account

Steem-client-rs v0.2 released: open source Rust client library for Steem by ontofractal

View this thread on: hive.blogpeakd.comecency.com
· @ontofractal · (edited)
$59.97
Steem-client-rs v0.2 released: open source Rust client library for Steem
![Steem + Rust](http://i.imgur.com/3QBLPi2.jpg)
I've published a second release of MIT licensed [steem-client-rs client](https://github.com/cyberpunk-ventures/steem-client-rs) which improves module apis, adds proper exception handling, better testing and latest cargo packages update. 

[Github Repo](https://github.com/cyberpunk-ventures/steem-client-rs)

# How to use

Steem-client-rs hasn't been graduated to crates.io yet, so you'll need to use a git dependency.

```rust
[dependencies]
steem-client = { git = "https://github.com/cyberpunk-ventures/steem-client-rs" }
```

Example code
```rust
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](https://www.rust-lang.org) 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
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 136 others
👎  , , , ,
properties (23)
authorontofractal
permlinksteem-client-rs-v0-2-released-open-source-rust-client-library-for-steem
categorysteemdev
json_metadata{"tags":["steemdev","steem","open-source","rust","steemstem"],"image":["http://i.imgur.com/3QBLPi2.jpg"],"links":["https://github.com/cyberpunk-ventures/steem-client-rs","https://www.rust-lang.org"],"app":"steemit/0.1","format":"markdown"}
created2017-03-26 16:20:21
last_update2017-03-26 16:23:03
depth0
children6
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value53.274 HBD
curator_payout_value6.696 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,720
author_reputation61,670,850,962,884
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,852,335
net_rshares22,095,571,753,648
author_curate_reward""
vote details (205)
@ardina ·
thank
properties (22)
authorardina
permlinkre-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170326t164016596z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-03-26 16:40:18
last_update2017-03-26 16:40:18
depth1
children0
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5
author_reputation1,182,671,789,406
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,852,578
net_rshares0
@kingscrown ·
$0.10
oh i love Rust, not that im good with it but been learning
👍  
properties (23)
authorkingscrown
permlinkre-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170326t200915060z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-03-26 20:09:18
last_update2017-03-26 20:09:18
depth1
children1
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.078 HBD
curator_payout_value0.026 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation2,115,800,977,100,594
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,854,952
net_rshares228,057,897,443
author_curate_reward""
vote details (1)
@ontofractal ·
:D same here, @kingscrown
properties (22)
authorontofractal
permlinkre-kingscrown-re-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170327t121107739z
categorysteemdev
json_metadata{"tags":["steemdev"],"users":["kingscrown"],"app":"steemit/0.1"}
created2017-03-27 12:11:09
last_update2017-03-27 12:11:09
depth2
children0
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length25
author_reputation61,670,850,962,884
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,861,950
net_rshares0
@ssekulji ·
great post :)
properties (22)
authorssekulji
permlinkre-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170326t213359955z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-03-26 21:33:51
last_update2017-03-26 21:33:51
depth1
children1
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation1,213,051,817,377,797
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,855,841
net_rshares0
@ontofractal ·
thanks :)
properties (22)
authorontofractal
permlinkre-ssekulji-re-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170327t125753163z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-03-27 12:57:54
last_update2017-03-27 12:57:54
depth2
children0
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length9
author_reputation61,670,850,962,884
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,862,408
net_rshares0
@ven123 ·
Good work!
properties (22)
authorven123
permlinkre-ontofractal-steem-client-rs-v0-2-released-open-source-rust-client-library-for-steem-20170326t170856951z
categorysteemdev
json_metadata{"tags":["steemdev"],"app":"steemit/0.1"}
created2017-03-26 17:08:57
last_update2017-03-26 17:08:57
depth1
children0
last_payout2017-04-27 02:40:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length10
author_reputation145,538,364,326
root_title"Steem-client-rs v0.2 released: open source Rust client library for Steem"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id2,852,902
net_rshares0