Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Added prebuilt binaries installation instructions to README #116

Merged
merged 2 commits into from
Oct 25, 2023
Merged
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
45 changes: 41 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,31 @@

## Installation

From crates.io:
### Install prebuilt binaries via shell script (Linux, macOS)

```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.sh | sh
```

### Install prebuilt binaries via powershell script (Windows)

```sh
irm https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.ps1 | iex
```

### Install prebuilt binaries into your npm project

```sh
npm install cargo-near
```

### Compile latest released version from source code

```console
$ cargo install cargo-near
cargo install cargo-near
```

To install from source:
### Compile latest development version from source code

```console
$ git clone https://github.com/near/cargo-near
Expand All @@ -37,7 +55,13 @@ $ cargo install --path cargo-near

## Usage

See `cargo near --help` for a complete list of available commands. Help is also available for each individual command with a `--help` flag, e.g. `cargo near build --help`.
See `cargo near --help` for a complete list of available commands or run `cargo near` to dive into interactive mode. Help is also available for each individual command with a `--help` flag, e.g. `cargo near build --help`.

```console
cargo near
```

Starts interactive mode that will allow to explore all the available commands.

```console
cargo near build
Expand All @@ -53,6 +77,19 @@ cargo near abi

Generates NEAR smart contract's [ABI](https://github.com/near/abi) (while in the directory containing contract's Cargo.toml).

```console
cargo near create-dev-account
```

Guides you through creation of a new NEAR account on [testnet](https://explorer.testnet.near.org).

```console
cargo near deploy
```

Builds the smart contract (equivalent to `cargo near build`) and guides you to deploy it to the blockchain.


## Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
Expand Down