webmention

A Rust library and CLI for sending, receiving, and validating IndieWeb Webmentions.

Library
Cargo
v0.6.0
21stars
MIT OR Apache-2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
22/100Needs Attention
Development Activity0
Maintenance0
Community16
Maturity60
Momentum12

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture75
Code Quality72
Innovation65
Learning Curve75

webmention is a Rust crate for working with W3C Webmentions — the IndieWeb protocol for one web page to notify another that it links to it. It handles endpoint discovery, sending mentions for the links in a post, validating incoming mentions, and, with optional features, receiving and storing them via a small web server. You can depend on it as a library to embed Webmention support into a larger service, or install its bundled CLI to send and receive mentions from the command line.

What You Get

  • Endpoint discovery and sending, so a page can notify every URL it links to
  • Validation and optional receiving/storage of incoming mentions behind feature flags
  • A bundled webmention CLI for sending and running a receiver server from the terminal

Common Use Cases

  • Sending Webmentions for the outbound links in a newly published blog post
  • Running a small server that receives and stores Webmentions for your site
  • Embedding Webmention endpoint logic inside a larger Rust web application

Under The Hood

Architecture - The crate is organized by concern: endpoint_discovery parses a target’s HTML and Link headers to find its Webmention endpoint, webmention.rs and http_client.rs handle sending, link_header.rs and html.rs do parsing, and storage.rs plus the optional receive path back a receiver server. A bin/ module provides the CLI, gated behind the cli feature. Tech Stack - Built on the Rust 2018 edition, it uses reqwest (rustls TLS) for HTTP, select for HTML parsing, url for URL handling, nom for parsing Link headers, serde for serialization, and thiserror/anyhow for errors; the optional receiver server is powered by rocket. Code Quality - The library separates public error types from internal error wrapping and includes tests such as the endpoint-discovery suite, though coverage is focused rather than exhaustive. API Design - Functionality is split cleanly between a reusable library API and a thin CLI, with optional cli and receive features so consumers only compile what they need, keeping the default dependency footprint small.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search