Clarify where to put cc dependency for build script. (#586)

This commit is contained in:
Alberto González Palomo 2020-03-30 18:43:41 +02:00 committed by GitHub
parent f453178ca2
commit bc0d53d4f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -36,6 +36,12 @@ fn main() {
}
```
Add the `cc` crate to your `Cargo.toml` under `[build-dependencies]`:
```toml
[build-dependencies]
cc="*"
```
To then use languages from rust, you must declare them as `extern "C"` functions and invoke them with `unsafe`. Then you can assign them to the parser.
```rust