From 078cf83a1339e87bedad91bc9be28eeb1513b8e1 Mon Sep 17 00:00:00 2001 From: mcb2003 Date: Thu, 31 Dec 2020 15:28:03 +0000 Subject: [PATCH] FFI::: Add gen-c-bindings cargo-make target This currently always saves the bindings to target/release. --- Makefile.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index 6697f15..241094f 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -1,3 +1,8 @@ +[tasks.gen-c-bindings] +install_crate = "cbindgen" +command = "cbindgen" +args = ["-c", "cbindgen.toml", "-o", "target/release/tts-rs.h"] + [tasks.build-android-example] script = [ "cd examples/android", @@ -12,4 +17,4 @@ script = [ [tasks.log-android] command = "adb" -args = ["logcat", "RustStdoutStderr:D", "*:S"] \ No newline at end of file +args = ["logcat", "RustStdoutStderr:D", "*:S"]