# Publishing to crates.io
## Prerequisites
1. Create a crates.io account at https://crates.io
2. Get your API token from https://crates.io/me
3. Login to cargo:
```bash
cargo login YOUR_API_TOKEN
```
## Before Publishing
1. **Update Cargo.toml**:
- Replace "Your Name <your.email@example.com>" with your actual name and email
- Replace "yourusername" in the repository URL with your GitHub username
- Consider if "lock-free" name is available (check on crates.io)
2. **Test everything**:
```bash
cargo test
cargo test --release
cargo bench
```
3. **Check package**:
```bash
cargo package --list cargo package cargo publish --dry-run ```
## Publishing
```bash
cargo publish
```
## After Publishing
- The crate will be available at https://crates.io/crates/lock-free
- Documentation will automatically be built at https://docs.rs/lock-free
- Users can add it to their Cargo.toml:
```toml
[dependencies]
lock-free = "0.1.0"
```
## Version Updates
For future updates:
1. Update version in Cargo.toml
2. Update CHANGELOG (if you have one)
3. Tag the release: `git tag v0.1.1`
4. Run `cargo publish`
## Important Notes
- Once published, you CANNOT delete or overwrite a version
- The name "lock-free" might already be taken - check first
- Consider using a more unique name like "your-prefix-lock-free"