| Crates.io | matroskin |
| lib.rs | matroskin |
| version | 0.0.3 |
| created_at | 2025-10-25 17:28:55.190016+00 |
| updated_at | 2025-10-25 17:59:28.681544+00 |
| description | whatsminer api client lib |
| homepage | |
| repository | https://github.com/TOwInOK/matroskin |
| max_upload_size | |
| id | 1900452 |
| size | 196,572 |
Library for interacting with WhatsMiner ASIC miners.
⚠️ Currently under active development ⚠️
matroskin is an actor-tokio based library for creating tool for ASIC infrastructure. It provides:
Marks:
[dependencies]
tokio = { version = "1.48.0", features = ["full"] }
matroskin = { version = "0" }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
Then, on your main.rs:
use tracing::Level;
use matroskin::{
account::Account,
actor::Actor,
command::{Command, set_miner_fastboot::SetMinerFastboot},
password::Password,
};
#[tokio::main]
async fn main() {
// Init logger
use tracing_subscriber::FmtSubscriber;
tracing::subscriber::set_global_default(
FmtSubscriber::builder()
.compact()
.with_max_level(level)
.without_time()
.finish(),
).expect("Fail to set global default subscriber");
// Create connection with ASIC
let actor = Actor::new("10.10.10.10:4433", Account::Super, Password::Super).await.expect("fail to establish connection");
// Create command
let command = GetDeviceInfo::default();
// Run command
//
// - First variant (actor execute cmd)
// - Second variant (run cmd using actor)
let response = actor.send(&command).await.expect("fail to execute"); // or let response = cmd.execute(&actor).await.unwrap();
println!("All Device Info: {:#?}", response);
Ok(())