Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Improve Windows setup instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
fnando committed Apr 1, 2024
1 parent 0300b96 commit 7b89a8d
Showing 1 changed file with 37 additions and 4 deletions.
41 changes: 37 additions & 4 deletions docs/getting-started/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ This page has been migrated to the Stellar Developers documentation. Please [cli
/>
</head>

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:
Expand All @@ -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.

:::tip

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

Expand Down Expand Up @@ -128,9 +147,9 @@ TESTING_OPTIONS:
--config-dir <CONFIG_DIR> Location of config directory, default is "."
```

:::info
:::tip

**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!!
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:

Expand All @@ -154,12 +173,26 @@ 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:

<Tabs>
<TabItem value="nix" label="macOS/Linux">

```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"
```

</TabItem>
<TabItem value="windows" label="Windows">

```bash
soroban network add --global testnet --rpc-url https://soroban-testnet.stellar.org:443 --network-passphrase "Test SDF Network ; September 2015"
```

</TabItem>
</Tabs>

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.

If you want project-specific network configurations, you can omit the `--global` flag, and the networks will be added to your working directory's `.soroban/network` folder instead.
Expand Down

0 comments on commit 7b89a8d

Please sign in to comment.