Practical overview
When it fits
Use near-sdk when implementing NEAR smart-contract logic in Rust. The repository's documented cargo-near workflow can then build a contract and ABI, create a testnet development account or guide deployment.
Who it is for
- Rust developers building smart contracts for NEAR.
- Contract authors who need state and method definitions, initialization logic or asynchronous interactions with other contracts.
Documented uses
- Define contract state and callable methods in Rust.
- Initialize contract state with an initialization method.
- Write unit tests for contract methods.
- Schedule calls to other contracts and handle callbacks or aggregate promise results.
- Use shared interfaces and implementations for NEAR fungible-token, non-fungible-token and upgradability standards.
Requirements & limits
The repository is public and identifies its license as Apache-2.0.
- The README states Rust 1.95.0 as the minimum supported version and cautions that a security patch release could require a higher toolchain version.
- The SDK is a library; cargo-near is a separate CLI tool documented for build, testnet development-account creation and deployment workflows.
- The repository includes a distinct near-contract-standards crate with interfaces and implementations for upgradability, NEP-141 fungible tokens and NEP-171 non-fungible tokens.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Build a NEAR contract with cargo-near
Compile a contract project and produce its ABI using the documented cargo-near workflow.
Before you start
- A NEAR Rust contract project with a Cargo.toml file.
- Rust 1.95.0 or later, the SDK's stated minimum supported Rust version.
- The separate cargo-near command-line tool installed.
Steps
Install cargo-near using one of the README's listed installation methods.
Open a terminal in the directory containing the contract's Cargo.toml.
Run the command below to build the contract and ABI.
cargo near build
Expected outcome
The command builds the NEAR smart contract and its ABI.
Guide limitations
- The README notes that ABI/schema problems can be bypassed with
cargo near build non-reproducible-wasm --no-abi; this skips ABI generation and is described as a workaround while resolving those problems. - This guide covers building only, not deployment.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 10 October 2026
- Original website title
- near/near-sdk-rs · Official homepage title · retained in its source language

