Skip to content

Commit

Permalink
Update README with instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Dec 10, 2019
1 parent 1657feb commit 4560247
Showing 1 changed file with 31 additions and 1 deletion.
32 changes: 31 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# solc-rust

Rust bindings for the Solidity compiler.
Rust bindings for the [Solidity] compiler. It exposes [Compiler Input and Output JSON] API.

## Usage

Add the dependency, as usual:

```toml
[dependencies]
solc = { git = "https://github.com/axic/solc-rust" }
```

In your project use it as:
```rust
pub fn main() {
// Let input be a valid "Standard Solidity Input JSON"
let input = "{}";
let output = solc::compile(&input);
assert_ne!(output.len(), 0);
}
```

## Maintainer(s)

Alex Beregszaszi

## License

GPL-3.0

[Solidity]: https://github.com/ethereum/solidity
[Compiler Input and Output JSON]: https://solidity.readthedocs.io/en/latest/using-the-compiler.html#compiler-input-and-output-json-description

0 comments on commit 4560247

Please sign in to comment.