Rust

Overview

The version of Rust supported is Rust 1.40.0

Each turn your source code will be compiled within a new sandbox, by default no information is shared or persisted between turns, if you wish to persist data then you should use the User Data field within the API.

Input - Standard Input (STDIN)

Within Rust you can use io::stdin() to capture the STDIN input

let stdin = io::stdin();
for line in stdin.lock().lines() {
    // Bot Logic
}

Ouput - Standard Outout (STDOUT)

Within Rust you can simply use println!() to return your CSV based instructions to BotWars.

println!("5:5-D,12:12-D");

Example Bot

use std::io::{self, BufRead};

fn main() {
    let stdin = io::stdin();
    for line in stdin.lock().lines() {
        // Bot Logic
    }

    println!("5:5-D,12:12-D");
}
❤️ Feedback