Cargo Near is a free, open-source Cargo extension for Windows developers who write smart contracts in Rust for the NEAR blockchain. It handles build and deployment steps for contracts written with near-sdk-rs and generates ABI schemas that describe how other software talks to those contracts.
The tool is aimed at NEAR contract developers, from people writing their first contract to teams preparing production releases. It is licensed under Apache-2.0 and distributed as a Windows build or installer. The current version, cargo-near-v0.23.0-rc.2, is a release candidate, so expect the interface to evolve before a stable release. For anyone starting a new NEAR project in Rust, it is a practical place to begin.
How a NEAR Smart Contract Moves From Code to Chain
A NEAR smart contract starts as Rust code that depends on near-sdk-rs, the SDK that provides the building blocks for NEAR contracts. Cargo Near wraps the steps around that code, turning the contract into the build output the network needs and preparing the deployment to an account.
Think of the workflow in three stages. First, you write and test the contract logic on your own machine. Second, you build a release artifact ready for the chain. Third, you deploy that artifact to a test or production account. Each stage has its own pitfalls, from missing dependencies to accidental changes in dependency versions, so a standard build command helps keep results repeatable.
Contracts on NEAR are public once deployed, so a small difference between builds can matter. Pinning dependencies through a committed Cargo.lock file is one way to make sure that a rebuild produces the same output you tested.
What ABI Schemas Do for Frontends and Integrations
An ABI schema is a machine-readable description of a contract's methods and their arguments. Cargo Near generates these schemas as part of its work on near-sdk-rs contracts, which gives other tools something precise to read.
Consider a web team building a dashboard that calls a contract's methods. Without a schema, the developer writes call formats by hand and checks them against the Rust source. With a generated schema, the frontend or a client library can be built from one agreed description, and a change in the contract shows up when the schema is regenerated.
Schemas are also useful for reviewers and for teams maintaining several contracts. They make a contract's public interface easier to review than reading the full source file. Keep the schema in version control next to the contract so that each release has a matching description.
Who Gets the Most Out of Cargo Near
Cargo Near suits a few typical groups. Solo developers learning NEAR can use the template and Codespaces path to get a working project quickly, then move to a local toolchain later. Teams shipping contracts to production benefit from repeatable builds, a committed lock file and generated schemas that frontend engineers can rely on.
Consultants who switch between client repositories may value a consistent command set across projects. Developers coming from other ecosystems, such as Solidity on Ethereum, will notice that the workflow is built around Rust and the NEAR SDK rather than an EVM toolchain, so some habits transfer and others do not.
The tool is less suited to people looking for a graphical editor or a no-code path. It is a command-line extension, and comfort with a terminal and basic Git is assumed.
Key features
Project Templates With cargo near new
Browser-Based Setup With GitHub Codespaces
Prebuilt Windows Binaries
Supported coins
Cargo Near targets smart contracts on the NEAR blockchain that are written in Rust with near-sdk-rs. It is focused on that single ecosystem, so if your project relies on other networks, pair it with tools designed for those environments.
How to install Cargo Near on Windows
- 1
Get the Installer Files
Open the project's GitHub Releases page and download the Windows build or installer for the version you need. Cargo Near is open source under Apache-2.0, so you can also review the source code on GitHub before installing. Download only from the official website or GitHub, not from mirrors or unofficial sites.
- 2
Run the PowerShell Script
The project publishes prebuilt binaries that are installed through a PowerShell script for Windows. Open PowerShell, locate the script in the release notes or README, and run it as described there. Read the script first so you know which files and paths it changes on your system.
-
Confirm the Command Works
Open a new terminal window and check that the cargo near command is recognized, for example by running it with the help flag. If Windows reports that the command is not found, close and reopen the terminal so that the updated PATH setting loads.
How to use Cargo Near
Start with the template so your project layout matches what the tool expects. The steps below follow the typical flow for a new contract.
- Run cargo near new with a project name to generate a project from the template repository.
- Open the project in your editor and read the contract code and the README.
- Build the contract with the cargo near build command for local development, then run your tests.
- Generate the ABI schema as part of the build so it stays in sync with the code.
- Commit Cargo.lock to Git once the project has dependencies, so later builds resolve the same versions.
- When you are ready for a production release, build with the recommended release variant and deploy to your target NEAR account.
If you prefer not to install anything locally, open the template repository in GitHub Codespaces and run the same commands in the browser-based devcontainer.
Pros & cons
- Free and open source under the Apache-2.0 license
- Quick project start from a template repository
- Codespaces option requires no local dependency installs
- Prebuilt Windows binaries installed through PowerShell
- Generates ABI schemas that help frontends and integrations
- Focused workflow for Rust contracts on NEAR
- The current release is a release candidate, so interfaces may change
- Limited to Rust and NEAR rather than a general-purpose toolkit
- Command-line workflow has a learning curve for beginners
- Reproducible builds depend on teams remembering to commit Cargo.lock
Is Cargo Near safe?
Cargo Near is a developer tool rather than a wallet, so it does not hold keys or funds. It still runs with your user permissions and produces contracts that go live on a public blockchain, so treat installation with care. Download only from the official website or the project's GitHub Releases page. Compare the SHA-256 checksum of the file with the value published by the project, or verify the signature if one is provided. Read the PowerShell installer before running it. Never enter a seed phrase on a third-party website, and be wary of any site offering a Cargo Near wallet or token. The current release is a release candidate, so check the official releases page for the newest version.
- Official source only. Download from github.com/near/cargo-near. Ignore ads and lookalike domains.
- Check the SHA-256. Compare the installer hash with the value the developer publishes before running it.
- Never share your seed phrase. No developer, support agent or website — including CryptApps — will ever ask for it.
Alternatives
Cargo Near occupies a different niche from several tools in this catalog. Foundry provides forge, cast and anvil for Solidity contracts on Ethereum-compatible chains, while Anchor is a framework for building Solana programs. Remix Desktop and the Solidity compiler serve Solidity developers, and Visual Studio Code with Solidity extensions is an editor setup rather than a build tool. Cargo Near is the right choice when your contracts are written in Rust and target NEAR. If you work across Ethereum and NEAR, you will likely use one toolchain for each.
Specifications
- Price
- Free
- Type
- Open source
- License
- Apache-2.0
- Latest version
- cargo-near-v0.23.0-rc.2
- Last update
- 29 Oct 2026
- Windows support
- Yes (Windows build or installer)
- Source code
- github.com/near/cargo-near
Frequently asked questions
Yes. Cargo Near is free and open source under the Apache-2.0 license. You can get the Windows build or installer from the official project page or GitHub Releases, and the source code is public so you can review it before installing.
It is a developer tool rather than a wallet, so its safety depends mostly on where you get the file. Verify the SHA-256 checksum or signature before running anything, and read the installer script first. Keep your seed phrase away from any website, including sites that claim to be affiliated with the project.
The prebuilt Windows binaries let you install the tool without compiling it from source. To write and compile Rust contracts on your own machine, you still need a Rust toolchain. If you want to avoid local installs, the GitHub Codespaces devcontainer provides the environment in the browser.
near-sdk-rs is the Rust SDK for writing smart contracts on NEAR. Cargo Near is built to work with it, handling build and deployment steps for projects that use it. If your contract is not written with near-sdk-rs, this tool is not the right fit for that project.
An ABI schema is a structured description of a contract's methods, arguments and return types. Frontends and other clients can read it to call the contract correctly without reading the Rust source. Cargo Near generates these schemas for near-sdk-rs contracts, so they stay aligned with the code.
Cargo.lock records the exact dependency versions your build used. Committing it means teammates and build systems resolve the same versions, which matters for contracts that will be deployed publicly. The project's guidance is to create the file, for example with cargo update, and add it to Git.
The current version, cargo-near-v0.23.0-rc.2, is a release candidate. That label means the release is close to final but may still change, so test your builds thoroughly before relying on them for a live contract. Review the release notes with each update.
Verdict
Cargo Near is a practical, free choice for Windows developers building Rust smart contracts on NEAR. It speeds up project setup with templates, offers a no-install Codespaces path, and generates ABI schemas that keep frontends and integrations in sync. It suits NEAR developers who are comfortable working in a terminal. If your work centers on Solidity or Solana, look at Foundry or Anchor instead. Because the current release is a release candidate, test your builds carefully before shipping.