This document explains how to publish rust_tui_coder to crates.io.
All tests pass
cargo test
# Result: 94 tests passed across 9 test suitesNo clippy warnings
cargo clippy --all-targets --all-features
# Result: Clean build with no warningsRelease build succeeds
cargo build --release
# Result: Successful compilationPackage metadata is complete
- Name:
rust_tui_coder - Version:
1.0.0 - Description: Comprehensive and descriptive
- License: MIT OR Apache-2.0
- Keywords: Relevant and within limit (5)
- Categories: Appropriate
- README: Present
- Authors: Specified
- Rust version: 1.70 minimum
Binary configuration
[[bin]]
name = "rust_tui_coder"
path = "src/main.rs"Users will be able to install the binary using:
cargo install rust_tui_coderThis will install the rct binary to ~/.cargo/bin/ (which should be in PATH).
After installation, users can run:
rctThe application will look for a config.toml file in the current directory.
-
Login to crates.io (one time only):
cargo login <your-api-token>
Get your API token from: https://crates.io/settings/tokens
-
Verify package contents:
cargo package --list
This shows what files will be included.
-
Dry run the publish:
cargo publish --dry-run
This verifies everything without actually publishing.
-
Publish to crates.io:
cargo publish
After publishing, the package will be available at:
- Main page:
https://crates.io/crates/rust_tui_coder - Documentation:
https://docs.rs/rust_tui_coder - Repository: Update the repository URL in Cargo.toml with actual GitHub URL
For future releases:
- Update version in
Cargo.toml - Run tests:
cargo test - Update CHANGELOG (if you create one)
- Commit changes
- Create git tag:
git tag v1.0.1 - Publish:
cargo publish - Push tag:
git push origin v1.0.1
The following are excluded from the published package (see Cargo.toml):
config.toml(user-specific configuration)plan.md(runtime generated file).gitand.gitignore(version control)tmp_rovodev_*(test artifacts)*.png(images, already in README)
- Configuration Required: Users need to create a
config.tomlfile with their LLM API credentials - First Run: Include instructions in README for first-time setup
- Binary Name: The binary is named
rctand can be renamed after installation if desired - Dependencies: All dependencies are properly specified in Cargo.toml
- Platform Support: Works on Linux, macOS, and Windows (tested on Linux)
After publishing, test the installation in a clean environment:
# In a new directory
cargo install rust_tui_coder
# Create config file
cat > config.toml << EOF
[llm]
api_key = "your-api-key"
api_base_url = "https://api.openai.com/v1"
model_name = "gpt-4"
EOF
# Run the application
rctDirect users to:
- GitHub repository for issues
- README.md for documentation
- config_example.toml for configuration template
If you need to yank a published version due to critical bugs:
cargo yank --vers 1.0.0To un-yank:
cargo yank --vers 1.0.0 --undoReady for Publication
All prerequisites have been met:
- Comprehensive test suite (94 tests)
- No clippy warnings
- Clean build
- Proper package metadata
- Documentation included
- Binary configuration correct