diff --git a/docs/getting-started/setup.mdx b/docs/getting-started/setup.mdx index fe4cd264..40e4f6b0 100644 --- a/docs/getting-started/setup.mdx +++ b/docs/getting-started/setup.mdx @@ -31,6 +31,9 @@ This page has been migrated to the Stellar Developers documentation. Please [cli /> +import Tabs from "@theme/Tabs"; +import TabItem from "@theme/TabItem"; + Soroban contracts are small programs written in the [Rust] programming language. To build and develop contracts you need only a couple prerequisites: @@ -41,13 +44,29 @@ To build and develop contracts you need only a couple prerequisites: ## Install Rust +### Linux, macOS, or other Unix-like OS + If you use macOS, Linux, or another Unix-like OS, the simplest method to install a Rust toolchain is to install `rustup`. Install `rustup` with the following command. ```bash curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ``` -If you use Windows, or need an alternative method of installing Rust, check out: https://www.rust-lang.org/tools/install +### Windows + +On Windows, download and run [rustup-init.exe](https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe). You can continue with the default settings by pressing Enter. + +:::info + +**Protip:** The soroban CLI uses emojis. To properly render them on Windows, we recommend using [Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/). See [how to install Windows Terminal](https://learn.microsoft.com/en-us/windows/terminal/install) on Microsoft Learn. + +::: + +If you're already using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install), you can also follow the instructions for Linux. + +### Other + +For other methods of installing [Rust], check out: https://www.rust-lang.org/tools/install ## Install the target @@ -130,7 +149,7 @@ TESTING_OPTIONS: :::info -**Protip:** You can use `soroban completion` to generate shell completion for `bash`, `elvish`, `fish`, `powershell`, and `zsh`. You should absolutely try it out. It will feel like a super power!! +**Protip:** You can use `soroban completion` to generate shell completion for `bash`, `elvish`, `fish`, `powershell`, and `zsh`. You should absolutely try it out. It will feel like a super power! To enable autocomplete in the current bash shell, run: @@ -154,11 +173,21 @@ Soroban has a test network called Testnet that you can use to deploy and test yo To configure your CLI to interact with Testnet, run the following command: + + ```bash -soroban network add --global testnet \ +soroban network add \ + --global testnet \ --rpc-url https://soroban-testnet.stellar.org:443 \ --network-passphrase "Test SDF Network ; September 2015" ``` + + +```bash +soroban network add --global testnet --rpc-url https://soroban-testnet.stellar.org:443 --network-passphrase "Test SDF Network ; September 2015" +``` + + Note the `--global` flag. This creates a file in your home folder's `~/.config/soroban/network/testnet.toml` with the settings you specified. This means that you can use the `--network testnet` flag in any Soroban CLI command to use this network from any directory or filepath on your system.