Rust is a programming language designed for performance and safety. It is syntactically similar to C++, but can guarantee memory safety without resorting to garbage collection. Rust has proven to be a mature and secure language, which makes it ideal to write smart contracts. Because of this, Rust is the preferred programming language for writing smart contracts on NEAR. While there might be a learning curve for those coming from web development, learning Rust enables to write safer and faster contracts. Furthermore, core contracts such as Fungible Tokens and DAOs are currently only available in Rust.
If you're getting started with Rust, we recommend you look through this overview in the
nearcore repository. It's a great way to get your first steps in for the language and its ecosystem.
Create Your First Rust Contract
Create your first Rust contract in minutes:
- Download and install Rust.
- Create a new rust project using our quickstart guide.
- Read our docs on how to write smart contracts.