Skip to main content
Start With Integrations For Faster SetupIf you want a recipe-backed path for a specific platform, start with the Integrations guides. The SDK is best when you want direct control inside your own service or gateway layer.

Installation

Add to your Cargo.toml:

Basic Usage

Synchronous Client

Asynchronous Client

Configuration

API Methods

check_mitigation(&request)

Check if a request should be mitigated.

verify_challenge(token, response)

Verify a user’s challenge response.

send_beacon_event(&event)

Send request traffic to the beacon server so Esper can analyze it and update state for later mitigation checks.

get_usage()

Get API usage statistics.

Framework Integration

Axum Middleware

Actix-web Middleware

Rocket Fairing

Error Handling

Features

The SDK supports different TLS implementations:

Testing

Performance

The Rust SDK is optimized for high performance:
  • Zero-copy deserialization with serde
  • Connection pooling with reqwest
  • Automatic retry with exponential backoff
  • Async/await support for concurrent operations

Examples

Complete examples are available in the GitHub repository:
  • Basic usage
  • Axum middleware
  • Actix-web middleware
  • Rocket fairing
  • Batch processing
  • Custom retry logic