From f8146b6225a2294fac9860c593e4e0076dc7bd88 Mon Sep 17 00:00:00 2001
From: jenya
Date: Wed, 30 Sep 2026 17:50:11 +0300
Subject: [PATCH 1/2] Prepare crates.io release: README install lines and
badges, blocking semver check
---
.github/workflows/ci.yml | 5 ++---
CLAUDE.md | 5 ++++-
README.md | 8 +++++---
3 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2dd6aa0..b83260b 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -112,12 +112,11 @@ jobs:
- name: Unused dependencies
run: cargo machete
- # Reports public API changes that need a version bump, compared with main.
- # Informational until the first crates.io release; then remove continue-on-error.
+ # Fails when a PR breaks the public API without bumping the version (0.2 -> 0.3).
+ # Additions pass.
semver:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
- continue-on-error: true
steps:
- uses: actions/checkout@v4
with:
diff --git a/CLAUDE.md b/CLAUDE.md
index 9138ae3..815e3f7 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -50,4 +50,7 @@ Keep the public surface small: modules private by default, export through `lib.r
- Duplicate edges and duplicate pre-trust peers: the last one wins.
- Weights must be finite and non-negative; distrust (negative weights) is rejected.
- The iteration stops after `max_iterations` (default 10,000) with `EigenTrustError::NotConverged`.
-- Version 0.2.0 is not on crates.io yet; the CI semver job is informational until it is.
+- Published on crates.io as `eigentrust` and `eigentrust-cli`. The CI semver job fails on PRs
+ that break the public API without a version bump. Bump all three crates' versions (and the
+ `eigentrust = "x.y"` requirements in cli/ and wasm/) together.
+- Release: `cargo publish -p eigentrust`, then `cargo publish -p eigentrust-cli`.
diff --git a/README.md b/README.md
index b70f553..6e5a7ff 100644
--- a/README.md
+++ b/README.md
@@ -6,6 +6,8 @@
+
+
@@ -29,7 +31,7 @@ It is the algorithm from the [EigenTrust paper](https://nlp.stanford.edu/pubs/ei
```toml
[dependencies]
-eigentrust = { git = "https://github.com/hypnagonia/eigentrust-rust" }
+eigentrust = "0.2"
```
```rust
@@ -60,12 +62,12 @@ fn main() -> Result<(), eigentrust::EigenTrustError> {
- `parallel` runs the iteration on all cores with rayon.
- There are no required dependencies beyond `log`, and the same code builds for `wasm32`.
-The crate documentation (`cargo doc --open`) covers the exact input rules and convergence behavior. See also [`examples/`](examples).
+The [documentation on docs.rs](https://docs.rs/eigentrust) covers the exact input rules and convergence behavior. See also [`examples/`](examples).
## Command line
```sh
-cargo install --git https://github.com/hypnagonia/eigentrust-rust eigentrust-cli
+cargo install eigentrust-cli
eigentrust localtrust.csv pretrust.csv [alpha]
```
From b17722cee51f0c0f003966790be31e164cb3dc32 Mon Sep 17 00:00:00 2001
From: jenya
Date: Wed, 30 Sep 2026 18:01:12 +0300
Subject: [PATCH 2/2] README: link the published crates on crates.io and
docs.rs
---
README.md | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/README.md b/README.md
index 6e5a7ff..7c0c8bb 100644
--- a/README.md
+++ b/README.md
@@ -27,8 +27,17 @@ It is the algorithm from the [EigenTrust paper](https://nlp.stanford.edu/pubs/ei
**Try it: [eigentrust.jenyadoesapps.com](https://eigentrust.jenyadoesapps.com)**, a live playground in 10 languages that can also rank 250,000 peers in the browser.
+Published on crates.io:
+
+| Crate | What you get | Links |
+| --- | --- | --- |
+| [`eigentrust`](https://crates.io/crates/eigentrust) | the Rust library | [docs.rs](https://docs.rs/eigentrust) |
+| [`eigentrust-cli`](https://crates.io/crates/eigentrust-cli) | the `eigentrust` command | [install](#command-line) |
+
## Rust library
+The [`eigentrust`](https://crates.io/crates/eigentrust) crate on crates.io:
+
```toml
[dependencies]
eigentrust = "0.2"
@@ -66,6 +75,8 @@ The [documentation on docs.rs](https://docs.rs/eigentrust) covers the exact inpu
## Command line
+The [`eigentrust-cli`](https://crates.io/crates/eigentrust-cli) crate on crates.io:
+
```sh
cargo install eigentrust-cli
eigentrust localtrust.csv pretrust.csv [alpha]