|
| 1 | +# Anthropic Tokio Fork - Development Guide |
| 2 | + |
| 3 | +## Version Bumping |
| 4 | + |
| 5 | +Every PR merged to an `anthropic-*` branch MUST bump the `+anthropic.N` version suffix. |
| 6 | +Increment `N` by 1 from whatever the current value is. |
| 7 | + |
| 8 | +### Files to update |
| 9 | + |
| 10 | +All publishable crates need matching version suffixes: |
| 11 | + |
| 12 | +- `tokio/Cargo.toml` - main tokio crate |
| 13 | +- `tokio-macros/Cargo.toml` - proc macros |
| 14 | +- `tokio-stream/Cargo.toml` - stream utilities |
| 15 | +- `tokio-test/Cargo.toml` - test utilities |
| 16 | +- `tokio-util/Cargo.toml` - additional utilities |
| 17 | + |
| 18 | +Example: if current versions end in `+anthropic.3`, update them all to `+anthropic.4`. |
| 19 | + |
| 20 | +### Version format |
| 21 | + |
| 22 | +`<upstream_version>+anthropic.<N>` |
| 23 | + |
| 24 | +Examples: |
| 25 | +- `1.49.0+anthropic.1` (first anthropic release based on tokio 1.49.0) |
| 26 | +- `1.49.0+anthropic.2` (second anthropic release) |
| 27 | + |
| 28 | +The `+anthropic.N` suffix is a semver build metadata tag — it does not affect dependency resolution but uniquely identifies our builds in Artifactory. |
| 29 | + |
| 30 | +## Publishing |
| 31 | + |
| 32 | +Publishing to the `crates-internal` Artifactory registry happens automatically via GitHub Actions when changes are pushed to an `anthropic-*` branch. See `.github/workflows/publish.yml`. |
| 33 | + |
| 34 | +## Stall Detection Feature |
| 35 | + |
| 36 | +The `stall-detection` feature is our primary addition. See `ANTHROPIC.md` for user-facing documentation. |
| 37 | + |
| 38 | +Key implementation files: |
| 39 | +- `tokio/src/runtime/stall_detection.rs` - monitor thread, signal handler, frame-pointer walker |
| 40 | +- `tokio/src/runtime/scheduler/multi_thread/worker.rs` - generation counter increments |
| 41 | +- `tokio/src/runtime/metrics/worker.rs` - WorkerMetrics fields |
| 42 | +- `tokio/src/runtime/builder.rs` - builder API methods |
0 commit comments