# Compilation & Testing Sandbox

Before deployment, Nyvo uses a sandbox environment for compiling and testing code. This part of the architecture includes:

<details>

<summary>Solidity/Rust Compilers</summary>

We have integrated compilers for various languages (the Solana Rust toolchain, the Solidity compiler, etc.) in a secure sandbox so that generated code can be immediately compiled to bytecode. Any errors from compilation are fed back to the AI for correction.

</details>

<details>

<summary>Test Runner</summary>

A system that can deploy the compiled contract to a local ephemeral blockchain (like a local Solana validator or an Ethereum Ganache instance) and run a series of test transactions. This allows Nyvo to verify that functions execute without runtime errors. It’s akin to a CI (Continuous Integration) pipeline automatically running whenever the AI produces new code.

</details>

<details>

<summary>Security Analyzer</summary>

We have integrated static analysis tools (for example, linters or analyzers like Slither for Solidity) that scan the code for vulnerabilities or anti-patterns. Results of these are also considered by the AI Orchestrator. If a potential issue (like a reentrancy vulnerability or an uninitialized variable) is detected, Nyvo will adjust the code or alert the user depending on severity.

</details>
