https://github.com/LemmyNet/activitypub-federation-rust Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + For + Enterprise + Teams + Startups + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} LemmyNet / activitypub-federation-rust Public * Notifications * Fork 5 * Star 114 High-level Rust library for the Activitypub protocol License AGPL-3.0 license 114 stars 5 forks Star Notifications * Code * Issues 2 * Pull requests 1 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights LemmyNet/activitypub-federation-rust This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 9 branches 10 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/L] Use Git or checkout with SVN using the web URL. [gh repo clone LemmyN] Work fast with our official CLI. Learn more. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @Nutomic Nutomic Add missing file ... 96f62b8 Nov 24, 2022 Add missing file 96f62b8 Git stats * 42 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time examples/federation Add missing file Nov 24, 2022 src Add some clippy lints Nov 24, 2022 .drone.yml Add some clippy lints Nov 24, 2022 .gitignore Use enum_delegate crate (#5) Nov 14, 2022 .rustfmt.toml Initial commit Jun 2, 2022 Cargo.lock Add some clippy lints Nov 24, 2022 Cargo.toml Version 0.3.4 Nov 23, 2022 LICENSE Initial commit Jun 2, 2022 README.md Change build status badge to drone.join-lemmy.org Nov 16, 2022 View code Activitypub-Federation Features How to use Roadmap License README.md Activitypub-Federation Build Status Crates.io A high-level framework for ActivityPub federation in Rust, extracted from Lemmy. The goal is that this library can take care of almost everything related to federation for different projects. For now it is still far away from that goal, and has many rough edges that need to be smoothed. Features * ObjectId type, wraps the id url and allows for type safe fetching of objects, both from database and HTTP * Queue for activity sending, handles HTTP signatures, retry with exponential backoff, all in background workers * Inbox for receiving activities, verifies HTTP signatures, performs other basic checks and helps with routing * Data structures for federation are defined by the user, not the library. This gives you maximal flexibility, and lets you accept only messages which your code can handle. Others are rejected automatically during deserialization. * Generic error type (unfortunately this was necessary) * various helpers for verification, (de)serialization, context etc How to use To get started, have a look at the API documentation and example code. You can also find some ActivityPub resources in the Lemmy documentation. If anything is unclear, please open an issue for clarification. For a more advanced implementation, take a look at the Lemmy federation code. Roadmap Things to work on in the future: * Improve documentation and example: Some things could probably be documented better. The example code should be simplified. where possible. * Simplify generics: The library uses a lot of generic parameters, where clauses and associated types. It should be possible to simplify them. * Improve macro: The macro is implemented very badly and doesn't have any error handling. * Generate HTTP endpoints: It would be possible to generate HTTP endpoints automatically for each actor. * Support for other web frameworks: Can be implemented using feature flags if other projects require it. * Signed fetch: JSON can only be fetched by authenticated actors, which means that fetches from blocked instances can also be blocked. In combination with the previous point, this could be handled entirely in the library. * Helpers for testing: Lemmy has a pretty useful test suite which (de)serializes json from other projects, to ensure that federation remains compatible. Helpers for this could be added to the library. * Webfinger support: Not part of the Activitypub standard, but often used together for user discovery. * Remove request_counter from API: It should be handled internally and not exposed. Maybe as part of Data struct. * License Licensed under AGPLv3. About High-level Rust library for the Activitypub protocol Topics rust federation activitypub lemmy Resources Readme License AGPL-3.0 license Stars 114 stars Watchers 9 watching Forks 5 forks Releases 10 tags Packages 0 No packages published Used by 2 * @LemmyNet @LemmyNet / lemmy * @LemmyNet @LemmyNet / activitypub-federation-rust Contributors 2 * * Languages * Rust 100.0% Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.