| Crates.io | brk_binder |
| lib.rs | brk_binder |
| version | 0.1.0-alpha.2 |
| created_at | 2025-10-02 15:41:56.670141+00 |
| updated_at | 2026-01-04 11:00:00.388017+00 |
| description | A generator of binding files for other languages |
| homepage | https://bitcoinresearchkit.org |
| repository | https://github.com/bitcoinresearchkit/brk |
| max_upload_size | |
| id | 1864582 |
| size | 206,779 |
Code generation for BRK client libraries.
Generate typed client libraries for Rust, JavaScript/TypeScript, and Python from the OpenAPI specification. Keeps frontend code in sync with available metrics and API endpoints without manual maintenance.
use brk_binder::{generate_clients, ClientOutputPaths};
let paths = ClientOutputPaths::new()
.rust("crates/brk_client/src/lib.rs")
.javascript("modules/brk-client/index.js")
.python("packages/brk_client/brk_client/__init__.py");
generate_clients(&vecs, &openapi_json, &paths)?;
| Language | Contents |
|---|---|
| Rust | Typed API client using brk_types, metric catalog |
| JavaScript | ES module with JSDoc types, metric catalog, fetch helpers |
| Python | Typed client with dataclasses, metric catalog |
Each client includes:
brk_query for metric enumerationbrk_types for type schemas