Note
This entire project was written by the 5.6 SOL GPT model. Use it at your own risk.
cargo-publicize makes private and restricted Rust items public by rewriting a crate or workspace in place.
MSRV is Rust 1.87. The repository uses the latest stable toolchain.
cargo install --git https://github.com/lava-sh/cargo-publicizeFrom a local checkout:
cargo install --path .cargo-publicize ./path/to/crateExclude files with repeatable gitignore-style patterns:
cargo-publicize ./path/to/crate \
--exclude 'tests/**' \
--exclude 'generated/**'Preview changes without writing:
cargo-publicize ./path/to/crate --checkThe source is modified in place. Use a clean version-controlled checkout. After transformation, a local dependency can reference the result:
[dependencies]
example = { path = "../vendor/example" }The CLI publicizes modules, types, fields, functions, constants, statics, type aliases, traits, inherent associated
items, and foreign items. It preserves comments and attributes, does not promote use declarations, and skips
proc-macro source trees.
Macro-generated and build.rs-generated code is not rewritten. Always build and test the consuming project after
transformation.