> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kontor.network/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

This guide walks you through setting up your development environment for Sigil smart contract development.

## Full Development Environment

If you're setting up a full Kontor development environment (including running the indexer and tests), see the [Kontor README](https://github.com/KontorProtocol/Kontor/blob/main/README.md) which covers:

* Installing all build dependencies (Bitcoin, ZMQ, etc.)
* Compiling Bitcoin Core for local testing
* Running the full test suite
* Docker deployment

## Contract Development Only

To develop and test Sigil contracts without running a local indexer:

### Install Dependencies

**MacOS:**

```bash theme={null}
brew install binaryen brotli
```

**Ubuntu:**

```bash theme={null}
sudo apt install binaryen brotli
```

### Set Up Rust

1. Install Rust from [rust-lang.org/tools/install](https://www.rust-lang.org/tools/install)
2. Add the WebAssembly target:
   ```bash theme={null}
   rustup target add wasm32-unknown-unknown
   ```
3. Install additional tools:
   ```bash theme={null}
   cargo install wasm-opt
   ```

## Working with Example Contracts

The [example contracts](https://github.com/KontorProtocol/Documentation/tree/main/example-contracts) in this documentation repository require the Kontor indexer `core` libraries.

**If you clone both repos as siblings**, the paths work out of the box:

```bash theme={null}
mkdir kontor-dev
cd kontor-dev
git clone https://github.com/KontorProtocol/Documentation.git
git clone https://github.com/KontorProtocol/Kontor.git
cd Documentation/example-contracts/hello-world/test
cargo test  # Will automatically build and test
```

**If your directory structure is different**, update the workspace dependencies in each example's root `Cargo.toml`:

```toml theme={null}
[workspace.dependencies]
testlib = { path = "/path/to/Kontor/core/testlib" }
stdlib = { path = "/path/to/Kontor/core/stdlib" }
```

Alternatively, create your own contract workspace from scratch following the [Hello World example](/docs/sigil/examples/hello-world), which shows the complete setup.

## Next Steps

After completing Hello World, explore more examples:

* [**Token**](/docs/sigil/examples/token) - Learn about storage, maps, and state management
* [**Shared Account**](/docs/sigil/examples/shared-account) - See cross-contract calls in action
* [**AMM**](/docs/sigil/examples/amm) - Build a full automated market maker with complex logic
* [**Pool**](/docs/sigil/examples/pool) - Understand liquidity pool patterns

For deeper understanding, see the [Reference documentation](/docs/sigil/reference/contract-structure).
