Skip to content

Publishing the Guard SDK

Crate Publishing

Prerequisites

  • crates.io account with publish permissions
  • All tests passing: cargo test -p oxide-guard-sdk
  • Version bumped in workspace Cargo.toml

Publish Order

Crates must be published in dependency order:

  1. oxide-guard-derive (no internal dependencies)
  2. oxide-guard-sdk (depends on derive + core crates)

Commands

# Dry run first
cargo publish -p oxide-guard-derive --dry-run
cargo publish -p oxide-guard-sdk --dry-run

# Publish
cargo publish -p oxide-guard-derive
# Wait for crates.io index to update (~1 minute)
cargo publish -p oxide-guard-sdk

Python Package

The Python bindings are published as part of the main oxideshield package:

cd oxide-python
maturin build --release
maturin publish

Version Strategy

The SDK crates follow the workspace version (0.1.x). Bump the version in the root Cargo.toml:

[workspace.package]
version = "0.1.7"  # bump here

Verification

After publishing, verify:

# Rust
cargo add oxide-guard-sdk
cargo build

# Python
uv pip install oxideshield --upgrade
python -c "from oxideshield import CustomGuard; print('OK')"