indieweb 0.9.1

A collection of utilities for working with the IndieWeb.
Documentation

IndieWeb Library

A Rust library for implementing IndieWeb standards and algorithms.

Overview

Provides tools for IndieWeb protocols including authentication, publishing, and communication standards.

Installation

Install from crates.io for stable releases:

cargo add indieweb

Or from Git for the latest development version:

cargo add --git https://git.sr.ht/~jacky/indieweb-rust indieweb

Modules

  • Algorithms: Link resolution, authorship detection, representative h-card parsing
  • Standards: IndieAuth, Micropub, Webmention, WebSub implementations
  • Traits: Common interfaces for IndieWeb interactions

Experimental Features

The following features are experimental and may change in future releases. Enable them with Cargo feature flags:

Feature Description Specification
WebSub Real-time content notification protocol WebSub
Microsub Feed consumption and interaction API Microsub
Microsub PTD Post type discovery for entries PTD
Microsub Source Timeline filtering by feed source Source Parameter
Microsub Metadata Enhanced feed metadata (name/photo) Feed Metadata
Vouch Anti-spam extension for Webmention Vouch
Salmention Upstream response propagation Salmention
Authorship Post authorship resolution algorithm Authorship
Micropub Channels Channel management extensions Channels
Micropub Syndication Content syndication extensions Syndication
Micropub Relations Post relationship extensions Relations

Usage Examples

# Enable WebSub support
indieweb = { version = "0.6", features = ["experimental_websub"] }

# Enable multiple experimental features
indieweb = { version = "0.6", features = ["experimental_websub", "experimental_microsub"] }

# Enable all experimental features
indieweb = { version = "0.6", features = ["experimental"] }

Note: Experimental features may have breaking changes between releases. Use with caution in production applications.

Microsub Extensions

The Microsub implementation includes several extensions that enhance feed reading capabilities:

Post Type Discovery (PTD)

Automatically classifies posts by type (article, note, photo, video, audio, like, reply, etc.):

use indieweb::standards::microsub::{Entry, Content};

// Entry with PTD-processed kind field
let entry = Entry {
    content: Some(Content {
        text: Some("This is a blog post with a title".to_string()),
        html: None,
    }),
    name: Some("My Blog Post".to_string()),
    // kind will be automatically set to "article"
    ..Default::default()
};

Source Parameter Filtering

Filter timeline results by specific feed sources:

use indieweb::standards::microsub::MicrosubServer;

// Get timeline filtered to specific feed
let timeline = server.timeline(
    "my-channel",
    None, None, None, // before, after, limit
    Some("https://example.com/feed.xml") // source filter
).await?;

Enhanced Feed Metadata

Feeds include automatically populated name and photo fields:

use indieweb::standards::microsub::MicrosubServer;

// Follow feed with enhanced metadata
let feed = server.follow("my-channel", "https://github.com/user/blog.atom").await?;
// feed.name = Some("GITHUB Feed")
// feed.photo = Some("https://github.com/favicon.ico")

Usage

For local development, add to your Cargo.toml:

[dependencies]
indieweb = { path = "../path/to/library" }

For detailed API usage, see the source code.