Rust bindings for the Solidity compiler. It exposes Compiler Input and Output JSON API.
git clone --recursive [email protected]: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