cargo-near-new-project-description
You can start coding on the NEAR Rust stack in less than a minute, thanks to NEAR Devcontainers. How?
- Click Use this template > Create a new repository
- In your newly created repo, click Code > Codespaces > Create codespace on main
Start writing your contract logic in src/lib.rs and integration tests in tests/test_basics.rs.
Install cargo-near and run:
cargo near build non-reproducible-wasmcargo testDeployment is automated with GitHub Actions CI/CD pipeline.
To deploy manually, install cargo-near and run:
cargo near deploy build-non-reproducible-wasm <account-id>Currently 1.86.0 is maximum version, supported by Nearcore for running compiled wasm contracts.
So, updating version to a newer toolchain is not recommended.
If, for whaterver reason, one needs to update rust in Codespaces environment,
it's possible to set password in codespaces container:
sudo passwd $(whoami)then, update rustup folder permissions
sudo chown -R $(whoami):$(whoami) /usr/local/rustupthen maybe remove some cargo-clippy conflicting binary:
rm $CARGO_HOME/bin/cargo-clippyand then run
rustup updateto completion.
- cargo-near - NEAR smart contract development toolkit for Rust
- near CLI - Iteract with NEAR blockchain from command line
- NEAR Rust SDK Documentation
- NEAR Documentation
- NEAR StackOverflow
- NEAR Discord
- NEAR Telegram Developers Community Group
- NEAR DevHub: Telegram, Twitter