Rust bindings for the Solidity compiler. It exposes Compiler Input and Output JSON API.
git clone --recursive git@github.com:Y-Nak/solc-rust.git
cargo build
Add the dependency, as usual:
[dependencies]
solc = { git = "https://github.com/Y-Nak/solc-rust" }
In your project use it as:
pub fn main() {
// Let input be a valid "Standard Solidity Input JSON"
let input = "{}";
let output = solc::compile(&input);
assert_ne!(output.len(), 0);
}
Alex Beregszaszi
GPL-3.0