validate_stylus_code
Validate Stylus Rust code for smart contracts by running cargo check to detect compilation errors and provide structured fixes with line numbers and guidance.
Instructions
Compile-check Stylus Rust code via cargo check and return structured errors with Stylus-specific fix guidance. Use AFTER generating code to verify correctness. Returns error codes, line numbers, and suggested fixes. Requires Docker.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | lib.rs source code to validate | |
| cargo_toml | No | Cargo.toml content (uses default SDK 0.10.0 template if omitted) |