From b743b250072139ea368b5f3359bedb42d9c8fa62 Mon Sep 17 00:00:00 2001 From: jburnett Date: Wed, 11 Feb 2026 12:13:12 -0500 Subject: [PATCH 1/3] Prepare for publishing to crates.io --- Cargo.toml | 8 ++++++++ README.md | 7 +++++++ src/btcnode-metrics/Cargo.toml | 8 +++++++- src/prom-api/Cargo.toml | 10 ++++++++-- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ba00e5e..4d5dc02 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,17 @@ members = [ "src/prom-api", ] resolver = "3" +name = "btcnode-prom-metrics" [workspace.package] edition = "2024" +version = "0.1.0" +description = "The Bitcoin node metrics exporter for Prometheus built on the Rust Bitcoin Community's corepc-client crate." +license-file = "LICENSE" +homepage = "https://github.com/AltaModaTech/btcnode-prom-metrics" +repository = "https://github.com/AltaModaTech/btcnode-prom-metrics" +readme = "README" +keywords = ["bitcoin, prometheus, metrics, corepc-client, rust"] [workspace.dependencies] corepc-client = { version = "0.10", features = ["client-sync"] } diff --git a/README.md b/README.md index ea7f20e..f0cda9e 100644 --- a/README.md +++ b/README.md @@ -10,3 +10,10 @@ The [corepc-client](https://crates.io/crates/corepc-client) crate replaces the p - [bitcoincore-rpc-json](https://crates.io/crates/) [GitHub](https://github.com/rust-bitcoin/rust-bitcoincore-rpc/tree/master/json) The Rust Bitcoin Community's public repository for this crate is at [corepc-client](https://github.com/rust-bitcoin/corepc). + +## Code structure + +This repository's code is separated into: + +- _prom-api_ implements the API for Prometheus to call for gathering metrics. +- _btcnode-metrics_ gathers metrics from the Bitcoin node and transforms them into Prometheus format. diff --git a/src/btcnode-metrics/Cargo.toml b/src/btcnode-metrics/Cargo.toml index e1b0bb0..108f370 100644 --- a/src/btcnode-metrics/Cargo.toml +++ b/src/btcnode-metrics/Cargo.toml @@ -1,6 +1,12 @@ [package] name = "btcnode-metrics" -version = "0.1.0" +description.workspace = true +license-file.workspace = true +homepage.workspace = true +repository.workspace = true +readme.workspace = true +keywords.workspace = true +version.workspace = true edition.workspace = true [dependencies] diff --git a/src/prom-api/Cargo.toml b/src/prom-api/Cargo.toml index 271879b..f48b731 100644 --- a/src/prom-api/Cargo.toml +++ b/src/prom-api/Cargo.toml @@ -1,10 +1,16 @@ [package] name = "prom-api" -version = "0.1.0" +description.workspace = true +license-file.workspace = true +homepage.workspace = true +repository.workspace = true +readme.workspace = true +keywords.workspace = true +version.workspace = true edition.workspace = true [dependencies] -btcnode-metrics = { path = "../btcnode-metrics" } +btcnode-metrics = { path = "../btcnode-metrics", version = "0.1.0" } axum.workspace = true tokio.workspace = true prometheus.workspace = true From 8d4a41486cb83ac9c8b6af5a24420849f8eee510 Mon Sep 17 00:00:00 2001 From: jburnett Date: Wed, 11 Feb 2026 12:14:53 -0500 Subject: [PATCH 2/3] fix readme file extension --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 4d5dc02..1690c97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ description = "The Bitcoin node metrics exporter for Prometheus built on the Rus license-file = "LICENSE" homepage = "https://github.com/AltaModaTech/btcnode-prom-metrics" repository = "https://github.com/AltaModaTech/btcnode-prom-metrics" -readme = "README" +readme = "README.md" keywords = ["bitcoin, prometheus, metrics, corepc-client, rust"] [workspace.dependencies] From 92d82ec1251da959ac67bd2f82351a7423a485be Mon Sep 17 00:00:00 2001 From: jburnett Date: Wed, 11 Feb 2026 13:38:41 -0500 Subject: [PATCH 3/3] fix keywords --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 1690c97..d16457e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ license-file = "LICENSE" homepage = "https://github.com/AltaModaTech/btcnode-prom-metrics" repository = "https://github.com/AltaModaTech/btcnode-prom-metrics" readme = "README.md" -keywords = ["bitcoin, prometheus, metrics, corepc-client, rust"] +keywords = ["bitcoin", "prometheus", "metrics"] [workspace.dependencies] corepc-client = { version = "0.10", features = ["client-sync"] }