---
title: Honeybadger Rust SDK
date: "2026-12-02"
publisher: Honeybadger
url: "https://www.honeybadger.io/changelog/rust-sdk/"
---

The official Honeybadger SDK for Rust is here in version 0.5.0 of the [`honeybadger` crate](https://crates.io/crates/honeybadger). It reports errors and panics from your Rust apps, and sends custom events you can query, chart, and alert on.

Versions 0.1–0.2 of `honeybadger` were a community crate by [Niel Drummond](https://github.com/fussybeaver), who agreed to let us use the name for the official SDK. Thank you, Niel! The official SDK has a different API, so if you're upgrading from the community crate, you'll need to update your code.

To get started, add `honeybadger` to `Cargo.toml`, along with `serde_json` for context and event values. The SDK needs Rust 1.88 or newer.

```toml
[dependencies] honeybadger = "0.5" serde_json = "1"
```

Then call `honeybadger::init` near the top of `main`. If your account is in the EU, follow the [EU setup in the Rust guide](https://docs.honeybadger.io/lib/rust/#initializing).

```rust
fn main() { let _guard = honeybadger::init( honeybadger::Config::builder() .api_key("PROJECT_API_KEY") // or set HONEYBADGER_API_KEY .env("production") .build() .unwrap(), ) .unwrap(); if let Err(e) = do_work() { honeybadger::notify(&e); } }
```

Once initialized, the SDK reports panics automatically, including under `panic = "abort"`. To report an error you've handled, pass it to `honeybadger::notify`. The report includes the error's causes and a backtrace. Honeybadger sends error reports in the background, so `notify` doesn't wait on the network, and you don't need an async runtime.

You can also add context, breadcrumbs, and tags to error reports, and redact sensitive values with `filter_keys`.

To send a custom event to Honeybadger, call `honeybadger::event` with a name and a JSON payload. Events are batched and sent in the background.

```rust
use serde_json::json; honeybadger::event("user.created", json!({ "user_id": 7, "plan": "pro" }));
```

Follow the [Rust guide](https://docs.honeybadger.io/lib/rust/) to configure the SDK, and check out the [working examples](https://github.com/honeybadger-io/honeybadger-rust/tree/v0.5.0/examples) on GitHub.

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
