Use this checklist when upgrading from async-nats 0.35 to 0.46.
- Read UPGRADE_ASSESSMENT.md
- Ensure all tests pass on current version (0.35)
just test-full
- Create a backup branch (skipped - working directly on upgrade)
git checkout -b backup/pre-nats-upgrade git push origin backup/pre-nats-upgrade git checkout main # or your working branch
-
Update
Cargo.toml:[workspace.dependencies] async-nats = { version = "0.46", features = ["service"] }
-
Update lock file:
cargo update -p async-nats
-
Verify the update:
cargo tree | grep async-nats # Should show: async-nats v0.46.0
-
Check for compilation errors:
cargo check --workspace
-
If errors occur, likely causes:
- Import path changes (update
usestatements) - Missing feature flags (add to Cargo.toml)
- Type changes (review error messages)
- Import path changes (update
-
Start NATS server:
just nats-up
-
Run all workspace tests:
cargo test --workspace -
Run integration tests specifically:
cargo test -p jsonrpc-nats --test integration_test -- --nocapture -
Run clippy for warnings:
cargo clippy --workspace --all-targets
-
Stop NATS server:
just nats-down
-
Test pingpong example server (requires live NATS):
# Terminal 1 cargo run -p pingpong -- server -
Test pingpong example client (requires live NATS):
# Terminal 2 cargo run -p pingpong -- client ping "hello" 3 cargo run -p pingpong -- client count cargo run -p pingpong -- client simple
-
Verify all client commands work correctly
-
Check for deprecation warnings:
cargo build --workspace 2>&1 | grep -i deprecat
-
Review any new warnings:
cargo build --workspace 2>&1 | grep -i warning
-
Check dependency tree for any conflicts:
cargo tree | grep -i conflict
- Update README.md if it mentions async-nats version
- Update any internal documentation
- Note any API changes in CHANGELOG.md
-
Review all changes:
-
Commit the upgrade:
git add Cargo.toml Cargo.lock git commit -m "Upgrade async-nats from 0.35 to 0.46 - Updated dependency to latest version - All tests passing - No breaking changes affecting our usage"
-
Tag the upgrade (optional):
git tag -a nats-0.46-upgrade -m "Upgraded to async-nats 0.46" git push origin nats-0.46-upgrade
If issues are discovered:
-
Revert Cargo.toml changes:
git checkout HEAD -- Cargo.toml Cargo.lock cargo check --workspace
-
Or revert to backup branch:
git checkout backup/pre-nats-upgrade
-
Document the issue for later investigation
After upgrade, verify these critical paths:
- Client can connect to NATS server
- Client can publish messages
- Client can subscribe and receive messages
- Server can create endpoints
- Server can handle RPC requests
- Request/Response pattern works
- Error handling works correctly
- All examples run without errors (requires live NATS server)
- No performance degradation (if applicable)
Common Issues:
-
Feature Flag Missing
- Error: "the following required features are not enabled..."
- Fix: Add missing feature to Cargo.toml features list
-
Import Path Changed
- Error: "cannot find ... in crate
async_nats" - Fix: Update use statements to new paths
- Error: "cannot find ... in crate
-
Type Changes
- Error: "expected ..., found ..."
- Fix: Consult CHANGELOG for type changes
Getting Help:
- NATS Rust Community: https://slack.nats.io/ (rust channel)
- GitHub Issues: https://github.com/nats-io/nats.rs/issues
- Documentation: https://docs.rs/async-nats/0.46.0
- All tests pass
- No new warnings
- Examples work correctly (requires live NATS server)
- Code review completed (if applicable)
- Ready for deployment
Upgraded by: GitHub Copilot Date: February 9, 2026 Version: async-nats 0.35 → 0.46 Test results: ☑ Pass ☐ Fail Notes:
✅ All unit tests passed (3/3)
✅ All clippy checks passed (0 warnings)
✅ Release build successful (132 crates compiled)
✅ Created comprehensive integration test suite (8 tests)
✅ No breaking changes affecting our codebase
✅ API compatibility verified through integration tests
Note: Manual example testing requires live NATS server
---
**Quick Commands Reference:**
```bash
# Full test suite with NATS setup/teardown
just test-full
# Update and test
cargo update -p async-nats && cargo test --workspace
# Check everything
just clean && just build && just clippy && just test