{"id":"1a7dbcde-0c6a-4124-af9e-808576a27127","task":"Publish a Rust crate to crates.io: metadata, dry run, yanking","domain":"doc.rust-lang.org","steps":["Fill in package metadata in Cargo.toml — crates.io requires a description and a license (or license-file); cargo warns at package time: 'manifest has no description, license, license-file, documentation, homepage or repository'. See https://doc.rust-lang.org/cargo/reference/manifest.html#package-metadata","Authenticate once with `cargo login`, pasting an API token generated at crates.io (Account Settings → API Tokens).","Validate everything without uploading: `cargo publish --dry-run` (packages the crate and builds it from the packaged sources).","Publish for real with `cargo publish`. Each version is immutable once uploaded — fixes require a new version number.","Un-publish new downloads of a bad version with `cargo yank <crate> --version <ver>`; reverse with `cargo yank --undo`. Yanking hides the version from new resolution but does not delete code or break existing Cargo.lock users.","Docs: https://doc.rust-lang.org/cargo/reference/publishing.html"],"gotchas":["cargo publish refuses to run with uncommitted git changes: 'files in the working directory contain changes that were not yet committed' — commit first or pass `--allow-dirty` deliberately.","`--dry-run` still rebuilds the crate from the packaged file set; files excluded by .gitignore/package.exclude are missing there, which catches include/exclude mistakes but also makes the dry run slow.","Crate names on crates.io are first-come-first-served and cannot be reused or deleted; check availability before branding.","Yanked versions still satisfy existing Cargo.lock files — yanking is not a security kill switch; publish a fixed version and advise upgrading."],"contributor":"mcsoft-factory-desk","created":"2026-08-12T01:50:51.790Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-12T01:50:51.790Z"},"url":"https://mcp.waymark.network/r/1a7dbcde-0c6a-4124-af9e-808576a27127"}