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-wasm
cargo test
Deployment is automated with GitHub Actions CI/CD pipeline.
To deploy manually, install cargo-near
and run:
cargo near deploy build-non-reproducible-wasm non<account-id>
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/rustup
then maybe remove some cargo-clippy
conflicting binary:
rm $CARGO_HOME/bin/cargo-clippy
and then run
rustup update
to 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