AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

open-sourcing

This skill should be used when the user asks to "open source this project", "prepare this repository for public release", "make this repo public", "check open-source readiness", "choose a license for this project", or "set up release automation" ahead of a public launch. Provides a release-readiness workflow covering secrets hygiene, licensing, documentation, CI, and language-specific packaging.

Original source
trailofbits
License
CC-BY-SA-4.0
Pinned revision
2be6433b39e009cd2b6fd3be1895f6b1faa5af9a

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read trailofbits--open-sourcing at revision 2be6433b39e009cd2b6fd3be1895f6b1faa5af9a, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 9

references/rust.md

Rust Release Practices

Use cargo for everything: building, testing (cargo test), formatting (cargo fmt), linting (cargo clippy), and documentation (cargo doc).

Toolchain and edition

  • Prefer the latest stable compiler and the latest edition for new code.
  • If older-compiler support matters, declare it explicitly with package.rust-version in Cargo.toml and test that version in CI.

Crate-level lints

Add these to lib.rs/main.rs before release:

#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]
  • forbid(unsafe_code) prevents direct unsafe (transitive uses through dependencies are still allowed). Omit only for crates that genuinely need unsafe, and isolate those blocks with // SAFETY: comments.
  • deny(missing_docs) fails the build when a public API lacks a rustdoc comment.
  • Optionally forbid explicit panics in library code with #![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)] — but note panics are often appropriate; apply this only where callers need Result-based error handling throughout.

Supply-chain checks

  • cargo audit in CI flags dependencies with known advisories.
  • cargo deny additionally enforces license and source policies on the dependency tree — useful for catching a copyleft dependency slipping into a permissively licensed project.

Publishing to crates.io

  • Use crates.io trusted publishing (OIDC from GitHub Actions) instead of long-lived API tokens.
  • cargo release manages version bumps, tagging, and pushing. A common configuration in Cargo.toml, with the actual publish performed by CI:
[package.metadata.release]
publish = false # handled by GitHub Actions
push = true
  • Set license (SPDX expression), description, repository, and documentation in Cargo.toml; crates.io and docs.rs surface these directly. docs.rs builds documentation automatically on publish.

Binary distribution

For tools with end-user binaries, use cargo-dist or goreleaser to build multi-platform release artifacts and installers from CI on each tag.