Rust bindings for the Solidity compiler. It exposes Compiler Input and Output JSON API.
Add the dependency, as usual:
[dependencies]
solc = { git = "https://github.com/axic/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