# Solidity Compiler

The **Solidity Compiler** lets you compile your smart contracts directly in your browser without installing external tools. It’s a powerful and flexible tool tailored for Ethereum developers who want an integrated, smooth experience for compiling `.sol` files within a smart contract IDE.

### &#x20;Features&#x20;

* **Smart file detection** – automatically shows all `.sol` files in your workspace
* **Multiple compiler versions** – choose the version that fits your contract requirements
* **Advanced compilation settings** – set optimizer, EVM version, and more
* **Auto-compile** – contracts can compile automatically when edited
* **Artifact generation** – generates and saves ABI and Bytecode for your contracts
* **Warnings and error handling** – shows helpful feedback for fixing your code

### Solidity Compiler Basics

To compile a smart contract, first select a `.sol` file in the **File Explorer**. If you have multiple files open, make sure the one you want to compile is the **active tab** in the Editor.

If no file is currently active or no contract has been compiled yet, the Solidity Compiler panel will appear empty, prompting you to choose or open a contract file.

<div align="center"><figure><img src="/files/KtIy8MYxWcBEQImrPTeM" alt="" width="239"><figcaption></figcaption></figure></div>

#### 1. **Select a File**

Once you open a workspace, all Solidity (`.sol`) files will be listed in the file dropdown. Select the one you want to compile.

<figure><img src="/files/Y14U9ynBYtyQh3bDJZHQ" alt="" width="201"><figcaption></figcaption></figure>

#### 2. **Choose a Compiler Version**

Select the Solidity version your contract requires. The list includes popular stable releases.

<figure><img src="/files/EIA1RGze5SFLrxxm7XlK" alt="" width="371"><figcaption></figcaption></figure>

#### 3. **Set Your Preferences**

You can configure the following:

* **Auto-compile**: Automatically compile the contract when it changes.
* &#x20;**Advanced Settings** (optional):

  * **Language**: Solidity or Yul
  * **EVM Version**: Select the Ethereum Virtual Machine version
  * **Enable Optimizer**: Optimize contract size and gas usage
  * **Optimizer Runs**: Number of optimizer iterations.

  <figure><img src="/files/blGyf2qLucwbUwApdu1X" alt="" width="306"><figcaption></figcaption></figure>

#### 4. **Compile the Contract**

Click the **"Compile"** button to manually compile the contract. If auto-compile is enabled, it may already compile after a change.

#### 5. **Check the Results**

After compiling:

* A **green tick** means compilation was successful.
* If there’s an error, it will be displayed at the bottom.

<figure><img src="/files/O3dm94t6SjHHpASZuy8l" alt="" width="198"><figcaption></figcaption></figure>

<figure><img src="/files/Z7NbixIpDZj7m04jzwHh" alt="" width="194"><figcaption></figcaption></figure>


---

# 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.qremix.org/solidity-modules/solidity-compiler.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.
