How rust-bitcoin/corepc works
Project Type and Purpose
• This is a Rust workspace providing:
• corepc-types: strongly typed Rust representations of every Bitcoin Core JSON-RPC method across versions (v17–v28).
• corepc-client: a blocking JSON-RPC client (not for production) that exercises types.
• corepc-node: a regtest node launcher for integration tests.
• jsonrpc: minimal JSONRPC 2.0 transport layer over HTTP/TCP/UDS.
• integration_test: end-to-end tests combining node + client + types.
• fuzz: fuzz harnesses targeting the JSONRPC client and types.
• verify: a tool that reads RPC API spec files and ensures the types/clients cover every method.
File‐Structure Analysis
• Top‐level crates: types/, client/, node/, jsonrpc/, integration_test/, fuzz/, verify/.
• Versioned Rust modules under types/src/v17…v28 and client/src/client_sync/v17…v28.
• Contrib/ directories with helper scripts; GitHub workflows for CI/fuzz.
• Cargo.toml in root plus per‐crate manifests – a typical Cargo workspace.
README Insights
• Describes crate roles, MSRV, design goal (exhaustive per‐version coverage), intended use (types in production; client only for tests).
• No runtime service‐oriented architecture; rather a multi-crate toolchain for testing and type generation.
Detail Level
• Per‐version modules only if zooming into the type schema component. Otherwise, show “types/src/v*/” as one grouped block.
• Explicitly show how verify uses RPC spec files (verify/rpc-api-v*.txt) to drive coverage checking.
• For fuzz, show two targets: HTTP transport fuzzing and JSON parsing fuzzing.