- A Rust toolchain
- An editor that supports Rust
- Stellar CLI
Install Rust
- macOS/Linux
- Windows
- Other
If you use macOS, Linux, or another Unix-like OS, the simplest method to install a Rust toolchain is to install Then restart the terminal.
rustup. Install rustup with the following command.v1.84.0 or higher, as the wasm32v1-none target is only available in recent versions.
To check your version:
Install the target
You’ll need a “target” for which your smart contract will be compiled. Install thewasm32v1-none target (again, this requires Rust v1.84.0 or higher).
When you install Rust, the WebAssembly target is installed per-toolchain. If you update your Rust version, you’ll need to reinstall the
wasm32v1-none target for the new toolchain.Configure an editor
Many editors have support for Rust. Visit the following link to find out how to configure your editor: https://www.rust-lang.org/tools Here are the tools to you need to configure your editor:- Visual Studio Code as code editor (or another code editor that supports Rust)
- Rust Analyzer for Rust language support
- CodeLLDB for step-through-debugging
Install the Stellar CLI
The Stellar CLI can execute smart contracts on futurenet, testnet, mainnet, as well as in a local sandbox.The latest stable release is available on the Stellar CLI releases page.
Install
There are a few ways to install the latest release of Stellar CLI.- macOS
- Linux
- Windows
Install using script (macOS, Linux):Install with Homebrew (macOS, Linux):Install with cargo from source:
Report issues and share feedback about the Stellar CLI here.
Documentation
The auto-generated comprehensive reference documentation is available here.Autocompletion
You can usestellar completion to generate shell completion for different shells. You should absolutely try it out. It will feel like a super power!
- Bash
- ZSH
- fish
- PowerShell
- Elvish
To enable autocomplete on the current shell session:To enable autocomplete permanently, run the following command, then restart your terminal: