From bc0d53d4f0a5a326fb593eda2eb9abd56f758d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Gonz=C3=A1lez=20Palomo?= Date: Mon, 30 Mar 2020 18:43:41 +0200 Subject: [PATCH] Clarify where to put `cc` dependency for build script. (#586) --- lib/binding_rust/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/binding_rust/README.md b/lib/binding_rust/README.md index 6a7bfc70..0ee4ba3f 100644 --- a/lib/binding_rust/README.md +++ b/lib/binding_rust/README.md @@ -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