#foundry #solidity #solc #ethereum #ethers

cyfrin-foundry-compilers

Utilities for working with solidity compilers, namely solc

2 unstable releases

0.4.0 May 20, 2024
0.3.20-aderyn May 20, 2024

#14 in #solc

Download history 341/week @ 2024-07-21 456/week @ 2024-07-28 342/week @ 2024-08-04 288/week @ 2024-08-11 568/week @ 2024-08-18 373/week @ 2024-08-25 295/week @ 2024-09-01 382/week @ 2024-09-08 428/week @ 2024-09-15 308/week @ 2024-09-22 300/week @ 2024-09-29 280/week @ 2024-10-06 346/week @ 2024-10-13 72/week @ 2024-10-20 28/week @ 2024-10-27 39/week @ 2024-11-03

505 downloads per month
Used in 4 crates (3 directly)

MIT/Apache

1MB
18K SLoC

Foundry Compilers

Originally part of ethers-rs as ethers-solc, Foundry Compilers is the compilation backend for Foundry.

ethers-rs's ethers-solc is considered to be in maintenance mode, and any fixes to it will also be reflect on Foundry Compilers. No action is currently needed from devs, although we heavily recommend using Foundry Compilers instead of ethers-solc.

Build Status Telegram chat

Supported Rust Versions

Foundry Compilers will keep a rolling MSRV (minimum supported rust version) policy of at least 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.65.0.

Note that the MSRV is not increased automatically, and only as part of a minor release.

Contributing

Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the Foundry Compilers project.

Pull requests will not be merged unless CI passes, so please ensure that your contribution follows the linting rules and passes clippy.

Overview

To install, simply add foundry-compilers to your cargo dependencies.

[dependencies]
foundry-compilers = { git = "https://github.com/foundry-rs/compilers" }

Example usage:

use foundry_compilers::{Project, ProjectPathsConfig};

// configure the project with all its paths, solc, cache etc.
let project = Project::builder()
    .paths(ProjectPathsConfig::hardhat(env!("CARGO_MANIFEST_DIR")).unwrap())
    .build()
    .unwrap();
let output = project.compile().unwrap();

// Tell Cargo that if a source file changes, to rerun this build script.
project.rerun_if_sources_changed();

Dependencies

~12–27MB
~424K SLoC