Skip to main content

Verified against Package registries and forge APIs (npm, PyPI, crates.io, RubyGems, Packagist, Go proxy, GitHub, Codeberg) on 2026-10-15; @fedify/* 2.4.4 on 2026-10-15.

Rust Libraries

Rust libraries for implementing ActivityPub.

Status and versions below were taken from crates.io and GitHub on 2026-10-15. Active = a release or commit in the last 12 months; Dormant = 12–36 months; Unmaintained = no release for over 3 years.

CrateLatest releaseStatus
activitypub_federation0.6.6 (2026-10-01)Active
http-signature-normalization0.7.1 (2026-06-17)Active
webfinger0.5.1 (2022-06-12)Dormant
activitystreams0.6.2 stable (2020); 0.7.0-alpha.25 (2023-07-06)Unmaintained
Kitsune (server)—Archived (August 2025)

activitypub_federation​

The federation framework extracted from Lemmy: object and actor traits, fetching with caching, signed delivery with a retrying queue, inbox handling, and WebFinger helpers. Integrations for actix-web and axum.

PropertyValue
Repositorygithub.com/LemmyNet/activitypub-federation-rust
Crateactivitypub_federation
Docsdocs.rs/activitypub_federation — includes a step-by-step guide
LicenseAGPL-3.0

Your types implement the Object trait (load/verify/convert) and, for actors, the Actor trait (id, public_key_pem, private_key_pem, inbox, …). Activities implement ActivityHandler. The docs.rs guide walks through each trait.

Sending Activities​

use activitypub_federation::activity_queue::queue_activity;

// `activity` implements ActivityHandler + Serialize,
// `actor` implements Actor, `data` is the request's Data<T>.
let inboxes = vec![remote_actor.shared_inbox_or_inbox()];
queue_activity(&activity, &local_actor, inboxes, &data).await?;

queue_activity signs and delivers with automatic retries. To run your own queue, use activity_sending::SendActivityTask::prepare(&activity, &actor, inboxes, &data) and call sign_and_send(&data) on each task.

http-signature-normalization​

Minimal-dependency draft-cavage HTTP Signatures where you supply the crypto. Companion crates add actix-web and reqwest integration. By asonix.

PropertyValue
Cratecrates.io/crates/http-signature-normalization
Companion crateshttp-signature-normalization-actix, http-signature-normalization-reqwest
LicenseAGPL-3.0

The Config builder has fediverse-relevant switches: mastodon_compat(), require_digest() and require_header(...). Signing is config.begin_sign(method, path_and_query, headers)?.sign(key_id, |signing_string| …)?; verification is config.begin_verify(method, path_and_query, headers)? then .verify(|signature, signing_string| …) after you look up key_id(). See docs.rs for full examples. It does not implement RFC 9421.

webfinger​

A WebFinger client and server-side resolver, from the Plume project.

PropertyValue
Cratecrates.io/crates/webfinger
LicenseGPL-3.0
// with_https = true
let wf = webfinger::resolve("acct:alice@example.com", true).await?;

for link in wf.links {
if link.rel == "self" {
if let Some(href) = link.href {
println!("Actor URL: {href}");
}
}
}

activitystreams​

Type-safe ActivityStreams vocabulary by asonix.

:::caution Unmaintained The last stable release (0.6.2) is from 2020 and the 0.7 line never left alpha (last alpha July 2023). activitypub_federation defines its own types and doesn't need it. :::

PropertyValue
Cratecrates.io/crates/activitystreams
LicenseGPL-3.0

Reference: Lemmy​

Lemmy's federation code lives in crates/apub/ (activities/, objects/, send/) and is the largest real-world user of activitypub_federation.

Choosing​

  • New server: activitypub_federation.
  • Own stack, only need signatures: http-signature-normalization (draft-cavage), and plan for RFC 9421 separately.

See Also​