# Installation & Building

There are several ways to install ItyFuzz. We recommend using the [ityfuzzup](#ityfuzzup-recommended) script.

### ityfuzzup **(Recommended)**

ityfuzzup is a script that automatically installs all dependencies and installs ItyFuzz.

```bash
curl -L https://ity.fuzz.land/ | bash
ityfuzzup
```

To update ItyFuzz, run `ityfuzzup` again.

### Build from Source

You first need to install Rust through <https://rustup.rs/>

You need to have `libssl-dev` (OpenSSL) and `libz3-dev` installed on your system. On Linux, you probably also need to install Clang >= 12.0.0 and use it for `CC` environment variables.

```bash
# Ubuntu:
sudo apt install libssl-dev libz3-dev pkg-config cmake build-essential clang
# macOS:
brew install openssl z3
```

Then, you can use `cargo` to build ItyFuzz. This can take seconds to hours depending on the amount of your CPU cores and memory.

```bash
git clone https://github.com/fuzzland/ityfuzz.git && cd ityfuzz
git submodule update --recursive --init
cargo build --release
```

This would create an executable at `target/release/ityfuzz`. This executable only supports offchain fuzzing (i.e., fuzzing without interacting with the blockchain). To build an executable for onchain fuzzing, run:

```bash
cargo build --release --features flashloan_v2
```

If you are developing ItyFuzz, you can create a debug build (much slower than release builds) and add the following useful features, which will enable more logs and assertions:

```bash
cargo build --features flashloan_v2,debug,flashloan_debug
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ityfuzz.rs/installation-and-building.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
