Release notes and unreleased changes can be found in the CHANGELOG
Install prebuilt binaries via shell script (Linux, macOS)
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.sh | shInstall prebuilt binaries via powershell script (Windows)
irm https://github.com/near/cargo-near/releases/latest/download/cargo-near-installer.ps1 | iexInstall prebuilt binaries into your Node.js application
npm install cargo-nearCompile and install from source code (Cargo)
cargo install cargo-nearor, install the most recent version from git repository:
$ git clone https://github.com/near/cargo-near
$ cargo install --path cargo-nearSee 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.
cargo nearStarts interactive mode that will allow to explore all the available commands.
cargo near buildBuilds a NEAR smart contract along with its ABI (while in the directory containing contract's Cargo.toml).
You can also make this command embed ABI into your WASM artifact by adding --embed-abi parameter. Once deployed, this will allow you to call a view function __contract_abi to retrieve a ZST-compressed ABI.
cargo near abiGenerates NEAR smart contract's ABI (while in the directory containing contract's Cargo.toml).
cargo near create-dev-accountGuides you through creation of a new NEAR account on testnet.
cargo near deployBuilds the smart contract (equivalent to cargo near build) and guides you to deploy it to the blockchain.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.