> For the complete documentation index, see [llms.txt](https://stylus-1.gitbook.io/stylusguide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stylus-1.gitbook.io/stylusguide/2.-setting-up-your-development-environment/setting-up-arbitrum-stylus.md).

# Setting Up Arbitrum Stylus

## Setting Up the Arbitrum Stylus Environment

To start developing with Arbitrum Stylus, follow these steps to set up your environment properly:

**Prerequisites**

1. **Rust Toolchain**
   * Ensure you have the Rust toolchain installed. Follow the [Rust Lang’s installation instructions](https://www.rust-lang.org/tools/install).
2. **VS Code**
   * Download and install [Visual Studio Code](https://code.visualstudio.com/).
   * Recommended extensions for Rust development:
     * rust-analyzer
     * Error Lens
     * Even Better TOML
     * crates

**Setting Up Arbitrum Stylus**

1. **Install Cargo Stylus**
   * Install the `cargo-stylus` and `cargo-stylus-check` tools:

     ```bash
     cargo install --force cargo-stylus cargo-stylus-check
     ```
2. **Add WASM Target**
   * Add WebAssembly as a build target for your Rust compiler:

     ```bash
     rustup target add wasm32-unknown-unknown
     ```
3. **Cargo Stylus Commands**
   * Verify the installation and see the available commands:

     ```bash
     cargo stylus --help
     ```
   * Available commands include:
     * `new`: Create a new Rust project
     * `export-abi`: Export a Solidity ABI
     * `check`: Check a contract
     * `deploy`: Deploy a contract
     * `replay`: Replay a transaction in gdb
     * `trace`: Trace a transaction
     * `c-gen`: Generate C code
     * `help`: Print help

**Developer Wallet / Account**

1. **Create a Developer Wallet**
   * Use MetaMask or another wallet service to create a fresh account for development purposes.
   * Avoid using personal accounts with real assets.
2. **Obtain the Private Key**
   * For MetaMask, follow the instructions to export your private key.

**CAUTION:** Never share your “secret recovery phrase” with anyone. A private key is valid for an individual account only, but a secret recovery phrase can be used to gain access to ALL accounts in your wallet.

**Acquiring Testnet ETH**

1. **BwareLabs Faucet**
   * Navigate to [BwareLabs Faucet](https://bwarelabs.com/faucets/arbitrum-sepolia).
   * Enter your wallet address and click Claim.
2. **Additional Faucets**
   * [QuickNode Arbitrum Sepolia Faucet](https://faucet.quicknode.com/arbitrum/sepolia)
   * [Sepolia Faucet](https://sepoliafaucet.com/)
   * [Sepolia Faucet PK910](https://sepolia-faucet.pk910.de/)

#### Summary

By following these steps, you will have your environment set up for developing and deploying Rust smart contracts on Arbitrum Stylus. Ensure you have the Rust toolchain, configure your development environment with VS Code, install the necessary `cargo-stylus` tools, set up a developer wallet, and acquire testnet ETH for testing your contracts.
