Skip to content
master
Switch branches/tags
Code
This branch is 1 commit behind paritytech:master.
Contribute

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
src
 
 
 
 
 
 
 
 
 
 

rust-solc

this is a work in progress. it works as described in the example. the API might change frequently in the future

Build Status

easily compile solidity files from rust

shells out to solc or solcjs (whichever is available in that order).

either solc (C++) or solcjs (JS) must be installed and in $PATH.
click here to see how to install solc
click here to see how to install solcjs

extern crate solc;

fn main() {
    let input_directory = "./contracts";
    let output_directory = "./contracts";

    // first tries solc
    // then tries solcjs
    // returns error if no compiler available
    solc::compile_dir(&input_directory, &output_directory).unwrap();

    // now `./contracts` contains a `*.bin` and a `*.abi` file
    // for every contract found in `*.sol` file in `./contracts`
}

this is an early version that likely misses features. open an issue if you're missing something

About

easily compile solidity files from rust

Resources

Releases

No releases published

Packages

No packages published

Languages