diff --git a/README.md b/README.md index 3d5ff4c..8963e01 100644 --- a/README.md +++ b/README.md @@ -56,15 +56,14 @@ Environment: sandbox # curl install script (Linux/macOS, downloads a prebuilt binary — fastest) curl -fsSL https://raw.githubusercontent.com/DENNIS-CODES/mpesa-dev/main/scripts/install.sh | sh -# cargo install (from source — needs Rust, works on any platform Rust supports) -git clone https://github.com/DENNIS-CODES/mpesa-dev && cd mpesa-dev -cargo install --path . --bin mpesa-dev +# cargo install (published on crates.io — needs Rust, works on any platform Rust supports) +cargo install mpesa-dev # Homebrew (once the tap is published — see packaging/homebrew/) brew tap DENNIS-CODES/tap && brew install mpesa-dev ``` -New to Rust or unsure which to pick? Use the curl script — it just downloads a ready-to-run binary, nothing to compile. See [RUNNING.md](RUNNING.md#packaging--installing) for details on each path. +New to Rust or unsure which to pick? Use the curl script — it just downloads a ready-to-run binary, nothing to compile. `cargo install mpesa-dev` pulls the [crates.io package](https://crates.io/crates/mpesa-dev) and builds both `mpesa-dev` and `mpesa-relay` locally. See [RUNNING.md](RUNNING.md#packaging--installing) for details on each path. ## Using it diff --git a/RUNNING.md b/RUNNING.md index fbac59e..3854e80 100644 --- a/RUNNING.md +++ b/RUNNING.md @@ -71,9 +71,19 @@ cargo build --release This crate builds two binaries: `mpesa-dev` (the CLI) and `mpesa-relay` (the tunnel relay, normally deployed on a VPS instead of your dev -machine). To install `mpesa-dev` onto your `PATH`, run `cargo install` -**from inside this directory** (the one containing `Cargo.toml`) with an -explicit path — don't run bare `cargo install` with no arguments: +machine). It's published on [crates.io](https://crates.io/crates/mpesa-dev), +so from anywhere: + +```sh +cargo install mpesa-dev +``` + +This installs both `mpesa-dev` and `mpesa-relay` onto your `PATH`. + +If you're working from a local checkout instead (e.g. contributing), run +`cargo install` **from inside this directory** (the one containing +`Cargo.toml`) with an explicit path — don't run bare `cargo install` with +no arguments: ```sh cargo install --path . --bin mpesa-dev @@ -361,15 +371,14 @@ changed: Three install paths, per the roadmap: -1. **`cargo install`** — works today; see [above](#installing-with-cargo-install). +1. **`cargo install mpesa-dev`** — published on + [crates.io](https://crates.io/crates/mpesa-dev); see + [above](#installing-with-cargo-install). 2. **curl install script** (`scripts/install.sh`) — detects OS/arch (`linux/x86_64`, `macos/x86_64`, `macos/aarch64`; no prebuilt `linux/aarch64` yet) and downloads the matching binary from the [latest GitHub release](https://github.com/DENNIS-CODES/mpesa-dev/releases). - Depends on `.github/workflows/release.yml` actually having run against a - pushed `vX.Y.Z` tag — **this hasn't happened yet in this repository**, so - until the first tag is pushed, the script has no release to download and - the script itself is untested end to end. + `v0.1.0` has been tagged and released, so this path is live end to end. 3. **Homebrew** — `packaging/homebrew/mpesa-dev.rb` is a formula template, not a published tap. Homebrew taps live in their own repo (conventionally `/homebrew-tap`), which is outside this repository — publishing it