Skip to content

Prepare policy crate for publication to crates.io#427

Merged
Mossaka merged 5 commits into
mainfrom
copilot/prepare-policy-crate-for-publishing
Oct 23, 2025
Merged

Prepare policy crate for publication to crates.io#427
Mossaka merged 5 commits into
mainfrom
copilot/prepare-policy-crate-for-publishing

Conversation

Copilot AI commented Oct 22, 2025

Copy link
Copy Markdown
Contributor

This PR prepares the policy crate for publication to crates.io, making it available as a standalone library for other projects to use.

Overview

The policy crate is a well-isolated component that provides parsing and validation for capability-based security policies for MCP servers. It has no dependencies on other crates in this repository and is ready to be shared with the broader Rust ecosystem.

Changes Made

Added Concise README.md (99 lines)

Created /crates/policy/README.md with essential documentation including:

  • Overview and features - Clear explanation of what the crate does and its key capabilities
  • Installation instructions - How to add the crate to a Cargo.toml
  • Quick start guide - Code examples to get users started quickly
  • Example policy YAML - Complete policy configuration example
  • Features list - Core capabilities (storage, network, environment, resources, validation)
  • API examples - Usage examples for PolicyParser and PolicyDocument
  • Examples - Links to the testdata directory with real-world policy examples
  • Cross-reference to policy-mcp - Highlighting the primary consumer of this crate
  • Support links - GitHub Issues, Discussions, and Discord

Updated Cargo.toml Metadata

Added all required metadata for crates.io publication:

description = "A Rust library for parsing and validating capability-based security policies for MCP servers"
repository = "https://github.com/microsoft/wassette"
homepage = "https://github.com/microsoft/wassette"
readme = "README.md"
keywords = ["mcp", "security", "policy", "webassembly", "permissions"]
categories = ["parser-implementations", "web-programming", "config"]
authors = ["Microsoft Corporation"]

Note: The documentation field is omitted as docs.rs will automatically generate and host documentation when the crate is published.

Updated CHANGELOG.md

Added an entry to the Unreleased section documenting this preparation work.

Verification

All quality checks pass:

  • cargo package - No warnings
  • cargo test - All 40 unit tests + 5 doc tests pass
  • cargo clippy - No linting issues
  • cargo doc - Documentation builds successfully
  • cargo publish --dry-run - Ready for publication
  • ✅ Package includes README.md (99 lines) and all necessary files
  • ✅ No local crate dependencies

Publishing

Once this PR is merged, a maintainer with crates.io credentials can publish the crate:

cd crates/policy
cargo publish

This will make the policy crate available at:

The crate can then be used by policy-mcp and other projects that need capability-based security policy management.

Original prompt

The policy crate is much decoupled from the rest of the codebase and does not depend on any other crates in this repo. Can you make sure that the policy crate is in a state where we can publish it to crates.io so that other projects can use this? Can you add a README to the policy crate that cross reference to https://github.com/microsoft/policy-mcp


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Oct 22, 2025
Copilot AI and others added 2 commits October 22, 2025 04:39
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot AI changed the title [WIP] Prepare policy crate for publishing to crates.io Prepare policy crate for publication to crates.io Oct 22, 2025
Copilot AI requested a review from Mossaka October 22, 2025 04:43
@Mossaka Mossaka marked this pull request as ready for review October 22, 2025 06:51
@Mossaka

Mossaka commented Oct 23, 2025

Copy link
Copy Markdown
Contributor

@copilot crates/policy/Cargo.toml:9 remove this

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

Copilot AI commented Oct 23, 2025

Copy link
Copy Markdown
Contributor Author

@copilot crates/policy/Cargo.toml:9 remove this

Removed the documentation field from Cargo.toml in commit b8481c7.

@Mossaka Mossaka merged commit beda918 into main Oct 23, 2025
15 checks passed
@Mossaka Mossaka deleted the copilot/prepare-policy-crate-for-publishing branch October 23, 2025 06:06
Mossaka added a commit to Mossaka/wassette that referenced this pull request Feb 2, 2026
* Initial plan

* Add README and crates.io metadata to policy crate

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

* Update CHANGELOG.md for policy crate publication preparation

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

* Remove documentation field and shorten README to under 100 lines

Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants