Publish the Matrix bridge to crates.io (potatomesh-matrix-bridge) #223

Open
opened 2026-10-04 23:04:39 +02:00 by adam · 0 comments
Owner

Goal

Publish the Rust Matrix bridge (matrix/) to crates.io as potatomesh-matrix-bridge, so it can be installed with cargo install potatomesh-matrix-bridge.

Not urgent — filing the readiness findings (from the v0.7.4 release prep) so it's a one-pass job when we pick it up.

Feasibility — ready

  • Name is free on crates.io (GET /api/v1/crates/potatomesh-matrix-bridge → 404 does not exist).
  • matrix/ is a standalone crate (no workspace parent, has its own Cargo.lock), so it publishes independently.
  • Builds with cargo 1.95; all dependencies are crates.io releases (no path/git deps).
  • It is a binary crate (main.rs / cli.rs, no lib.rs) → consumers cargo install it; it is not a library dependency.

Blockers — Cargo.toml metadata

matrix/Cargo.toml currently carries only name / version / edition. crates.io requires description and license; the rest are strongly recommended. Add to [package]:

description = "Bridges PotatoMesh LoRa mesh messages into a Matrix room — one Matrix puppet user per mesh node."
license = "Apache-2.0"
repository = "https://github.com/l5yth/potato-mesh"
homepage = "https://potatomesh.net"
readme = "README.md"
keywords = ["matrix", "meshtastic", "lora", "mesh", "bridge"]
categories = ["command-line-utilities", "network-programming"]
authors = ["l5yth & contributors"]

Caveats to resolve before publishing

  1. README image breaks on the crates.io page. matrix/README.md references ../scrot-0.6.png, which is outside the crate dir, so cargo won't package it → broken image on the crates.io listing. Fix: copy the screenshot into matrix/ and update the path, or drop the image from the published README.
  2. No LICENSE file anywhere in the repo. The README says "(see LICENSE)" but none exists. license = "Apache-2.0" (SPDX) satisfies crates.io without a file, but adding a repo-root LICENSE (Apache-2.0 text) fixes the dangling reference and is best practice.
  3. Version lockstep. 0.7.4 is kept in sync across the five manifests by tests/test_version_sync.py. Once published, every future release bump needs its own cargo publish (or a release-automation step).

Publish steps (human-gated)

Publishing is irreversible — crates.io only allows yank, not delete:

cargo login <crates.io token>
cd matrix
cargo publish --dry-run   # verify packaging + build
cargo publish

Checklist

  • Add the metadata block to matrix/Cargo.toml
  • Fix the README image (copy the screenshot into matrix/, or remove it)
  • Add a repo-root LICENSE (Apache-2.0) — optional, but fixes the README reference
  • cargo publish --dry-run clean
  • cargo publish (maintainer, with crates.io token)
  • Decide on release automation so future version bumps re-publish
## Goal Publish the Rust Matrix bridge (`matrix/`) to crates.io as **`potatomesh-matrix-bridge`**, so it can be installed with `cargo install potatomesh-matrix-bridge`. Not urgent — filing the readiness findings (from the v0.7.4 release prep) so it's a one-pass job when we pick it up. ## Feasibility — ready - **Name is free** on crates.io (`GET /api/v1/crates/potatomesh-matrix-bridge` → `404 does not exist`). - `matrix/` is a **standalone crate** (no workspace parent, has its own `Cargo.lock`), so it publishes independently. - Builds with cargo 1.95; all dependencies are crates.io releases (no path/git deps). - It is a **binary** crate (`main.rs` / `cli.rs`, no `lib.rs`) → consumers `cargo install` it; it is *not* a library dependency. ## Blockers — Cargo.toml metadata `matrix/Cargo.toml` currently carries only `name` / `version` / `edition`. crates.io **requires** `description` and `license`; the rest are strongly recommended. Add to `[package]`: ```toml description = "Bridges PotatoMesh LoRa mesh messages into a Matrix room — one Matrix puppet user per mesh node." license = "Apache-2.0" repository = "https://github.com/l5yth/potato-mesh" homepage = "https://potatomesh.net" readme = "README.md" keywords = ["matrix", "meshtastic", "lora", "mesh", "bridge"] categories = ["command-line-utilities", "network-programming"] authors = ["l5yth & contributors"] ``` ## Caveats to resolve before publishing 1. **README image breaks on the crates.io page.** `matrix/README.md` references `../scrot-0.6.png`, which is *outside* the crate dir, so cargo won't package it → broken image on the crates.io listing. Fix: copy the screenshot into `matrix/` and update the path, or drop the image from the published README. 2. **No LICENSE file anywhere in the repo.** The README says "(see LICENSE)" but none exists. `license = "Apache-2.0"` (SPDX) satisfies crates.io without a file, but adding a repo-root `LICENSE` (Apache-2.0 text) fixes the dangling reference and is best practice. 3. **Version lockstep.** `0.7.4` is kept in sync across the five manifests by `tests/test_version_sync.py`. Once published, every future release bump needs its own `cargo publish` (or a release-automation step). ## Publish steps (human-gated) Publishing is irreversible — crates.io only allows *yank*, not delete: ``` cargo login <crates.io token> cd matrix cargo publish --dry-run # verify packaging + build cargo publish ``` ## Checklist - [ ] Add the metadata block to `matrix/Cargo.toml` - [ ] Fix the README image (copy the screenshot into `matrix/`, or remove it) - [ ] Add a repo-root `LICENSE` (Apache-2.0) — optional, but fixes the README reference - [ ] `cargo publish --dry-run` clean - [ ] `cargo publish` (maintainer, with crates.io token) - [ ] Decide on release automation so future version bumps re-publish <!-- github-sync-id:5023673725 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/potato-mesh#223