Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
25 changes: 17 additions & 8 deletions RUNNING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
`<owner>/homebrew-tap`), which is outside this repository — publishing it
Expand Down
Loading