# go-zero capability mapping
| `rest` | `rs-zero` feature `rest` | Uses `axum::Router` and `tower::Layer` instead of `net/http`. |
| `zrpc` | `rs-zero` feature `rpc` | Uses `tonic` channel/server helpers. |
| `core/conf` | `rs_zero::core::config` | TOML plus environment overrides through `config`. |
| `core/logx` | `rs_zero::core::logging` | Uses `tracing` and `tracing-subscriber`. |
| `core/service` | `rs_zero::core::ServiceGroup` | Async service group with shared shutdown token, REST/RPC adapters and timeout-protected stop. |
| `core/load`, `core/breaker`, `core/limit` | `rs-zero` feature `resil` | Starts with explicit, testable primitives. |
| `tools/goctl` | `rs-zero-cli` | First version generates a fixed Rust REST service scaffold. |
## Design stance
rs-zero keeps go-zero's engineering intent: good defaults, resilience, observability, and generated project shape. It does not preserve Go-specific internal APIs.
## Milestone 2 additions
| `tools/goctl/api/parser` | `rzcli api validate` | Parses a practical `.api` subset into a Rust AST. |
| `tools/goctl/api/gogen` | `rzcli api gen` | Generates Rust REST DTOs, router, handlers, main and config. |
| `tools/goctl/api/swagger` | `rzcli api openapi` | Exports OpenAPI 3.0.3 JSON from the same AST. |
## Milestone 3 additions
| `core/discov` | `rs-zero` feature `discovery` | Provides `Discovery` traits plus static, memory, and DNS adapters. External registries can implement the same trait later. |
| `core/stat`, `core/trace` | `rs-zero` feature `observability` | Provides Prometheus text metrics helpers and OpenTelemetry tracing configuration. |
| `tools/goctl/model` | `rzcli model gen` | Generates Rust entity, SQLx repository, cache key helpers, and optional cache-aside repository from SQL schema files. |
## Milestone 4 additions
| `core/discov` external adapters | `discovery-etcd`, `discovery-kube` features | Adds production adapter boundaries for etcd v3 and Kubernetes endpoint mapping. |
| `core/trace` OTLP | `rs_zero::observability::otlp` with `otlp` feature | Adds OTLP traces config and shutdown/flush handle. |
| `core/stores`, `core/stores/cache` | `db-*`, `cache`, `cache-redis` features | Adds SQLx pool helpers and cache traits with Redis facade. |
## Milestone 5 compatibility boundary
rs-zero maps goctl compatibility to stable input semantics and Rust-first generators. API/model/RPC fixtures are intentionally small and live under `tests/fixtures/goctl/`. The project does not claim byte-for-byte compatibility with goctl's Go output; unsupported commands and language generators are tracked in `docs/goctl-compatibility.md`.