| Crates.io | remotro |
| lib.rs | remotro |
| version | 0.2.0 |
| created_at | 2025-08-11 18:06:40.462456+00 |
| updated_at | 2025-12-27 23:11:15.980055+00 |
| description | A crate allowing remote control of Balatro |
| homepage | |
| repository | https://github.com/remotro/client |
| max_upload_size | |
| id | 1790533 |
| size | 116,217 |
This crate provides a method to interact with Balatro when used with the mod at https://github.com/remotro/mod
Sample Implementation:
use remotro::Remotro;
use remotro::balatro::CurrentScreen::*;
let mut remotro = Remotro::host("0.0.0.0", 34143).await.expect("Socket is not available");
loop {
let mut balatro = match remotro.accept().await {
Ok(b) => b,
Err(e) => println!("Connection failed: {e}")
};
loop {
match balatro.screen().await {
Ok(screen) => match screen {
Menu(menu) => {
/* Menu handler */
}
/*...*/
GameOver(game) => {
/* Game Over handler */
}
}
Err(e) => {
println!("{e}");
break; // Goes back to listening for connections
}
}
}
}
This code will attempt to open a port and wait for the mod to connect to it, then continually matches the current screen, running the code specified for each screen