Follow these instructions for setting up Rust.
To install Rust on Linux or MacOS, use the following command:
Then, add the
wasm32-unknown-unknown toolchain. This toolchain is required because the contracts that we will build will be compiled to Wasm to run on the NEAR blockchain.
The best way to create a new NEAR app connected with a frontend is through create-near-app. When initializing the project, be sure to include the
--contract=rust flag to use the Rust SDK.
To initialize a new project with
cargo-generate, run the following commands:
If you would like to generate a new crate manually with
cargo new --lib <crate-name>, make sure you include the following configuration in the generated