Rust client
The Rust client library for Windmill provides a convenient way to interact with the Windmill platform's API from within your Rust applications. By authenticating with the WM_TOKEN
reserved variable or custom tokens, you can utilize the Rust client to access various functionalities offered by Windmill.
Installation
To use the Rust client library, you need to add the wmill
crate to your Cargo.toml
dependencies:
[dependencies]
wmill = "^1.0"
Or using cargo:
cargo add wmill
Usage
Usage
Initialize Client
use wmill::Windmill;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Read config from env vars
let wm = Windmill::default()?;
// Or override specific values
let wm = Windmill::new(
Some("custom_token".to_string()),
Some("my_workspace".to_string()),
Some("http://localhost:8000".to_string())
)?;
Ok(())
}