Skip to content

Utilities for working with native solc and compiling projects.

License

Notifications You must be signed in to change notification settings

elfedy/compilers

This branch is 27 commits behind foundry-rs/compilers:main.

Folders and files

NameName
Last commit message
Last commit date
Jun 28, 2024
Jun 14, 2024
Nov 19, 2024
Nov 7, 2023
Sep 17, 2024
May 3, 2024
Nov 18, 2024
Nov 4, 2023
Nov 18, 2024
Oct 4, 2023
Oct 4, 2023
Sep 4, 2024
Jun 4, 2024
Jun 14, 2024
Oct 14, 2024
Nov 4, 2023
Dec 6, 2023

Repository files navigation

Foundry Compilers

| Docs |

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 reflected 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.70.0.

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

Contributing

Thanks for your help in 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 = "0.10.1"

Example usage:

use foundry_compilers::{Project, ProjectPathsConfig};
use std::path::Path;

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

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

About

Utilities for working with native solc and compiling projects.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 97.6%
  • Solidity 2.3%
  • Other 0.1%