Skip to main content
To use the Wacht Rust SDK, add the wacht crate to your project’s dependencies. The SDK relies on the tokio asynchronous runtime.

Adding the Dependency

You can add the SDK via the command line:
cargo add wacht
Or, add it directly to your Cargo.toml:
[dependencies]
wacht = "0.1.0-beta.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

Cargo Features

The wacht crate exposes optional features to keep your compile times fast and your binary size small.
  • axum (default): Enables compatibility with the axum web framework. This provides the AuthLayer middleware and various request extractors to authorize incoming HTTP requests automatically.

Requirements

  • Rust Toolchain: stable (edition 2021 recommended)
  • Runtime: tokio (requires the rt-multi-thread and macros features for standard usage)