jenkins-sdk-rust provides a modern, ergonomic interface for talking to Jenkins—from tiny CLI utilities to production
services.
The crate ships both asynchronous (Tokio) and blocking clients, exposes each REST endpoint as a strongly-typed
value, and offers a chainable builder with ready-made middleware such as automatic CSRF-crumb fetching and *
exponential back-off retries*.
✨ Features
- Async & Blocking – pick the I/O model that fits your project at compile time. The default feature set builds the
async client; enable
blocking-clientwhen you need synchronous calls. - Type-safe endpoints – each API call is represented by a zero-cost struct implementing
Endpoint; responses deserialize into concrete Rust types. - Composable middleware – add automatic retries, CSRF crumbs, custom transports, or roll your own.
- No magic strings – URL construction, query/form encoding, error mapping, and JSON decoding are handled for you.
- Pure Rust, small deps – built on
reqwestwithrustlsTLS by default.
🚀 Supported API Endpoints
-
Job Management
- Retrieve jobs information
- Fetch console logs
- Trigger builds with parameters
- Stop ongoing builds
-
Queue Management
- Retrieve build queue details
-
Executor Management
- Retrieve executor statistics and status
📥 Installation
Add this dependency to your Cargo.toml:
[]
= "0.1"
⚡Quick Start
Async Example
use ;
use ;
use Duration;
async
Sync Example
// Compile with `default-features = false, features = ["blocking-client"]`.
use ;
use QueueLength;
use Duration;
📃 License
This project is licensed under the MIT License.