From 21214dbd0322f27d3f31767817c9267242e0a30f Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Wed, 25 Oct 2023 08:48:43 +0200 Subject: [PATCH] docs: Added prebuilt binaries installation instructions to README (#116) --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 20c9ae68..4199e424 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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