Switch to a workspace.

This commit is contained in:
Nolan Darilek 2019-12-22 12:12:27 -06:00
parent e919820f9d
commit 3da5140735
9 changed files with 60 additions and 9 deletions

View File

@ -1,10 +1,6 @@
[package]
name = "speech-dispatcher"
version = "0.3.2"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://gitlab.com/ndarilek/speech-dispatcher-rs"
description = "Rusty interface to the speech-dispatcher speech synthesis library"
license = "LGPL-2.1"
[workspace]
[dependencies]
speech-dispatcher-sys = "0.3"
members = [
"speech-dispatcher-sys",
"speech-dispatcher"
]

View File

@ -0,0 +1,11 @@
[package]
name = "speech-dispatcher-sys"
version = "0.4.0"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://gitlab.com/ndarilek/speech-dispatcher-sys"
description = "speech-dispatcher system bindings"
license = "LGPL-2.1"
[build-dependencies]
bindgen = "0.51"
gcc = "0.3"

View File

@ -0,0 +1,23 @@
extern crate bindgen;
use std::env;
use std::path::Path;
fn main() {
println!("cargo:rustc-link-lib=speechd");
let out_dir = env::var("OUT_DIR").unwrap();
let _ = bindgen::builder()
.header("wrapper.h")
.constified_enum_module("SPDConnectionMode")
.constified_enum_module("SPDPriority")
.constified_enum_module("SPDVoiceType")
.constified_enum_module("SPDDataMode")
.constified_enum_module("SPDNotification")
.constified_enum_module("SPDPunctuation")
.constified_enum_module("SPDCapitalLetters")
.constified_enum_module("SPDSpelling")
.use_core()
.layout_tests(false)
.generate().unwrap()
.write_to_file(Path::new(&out_dir).join("speech_dispatcher_sys.rs"));
}

View File

@ -0,0 +1,7 @@
#![allow(non_upper_case_globals)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
extern crate core;
include!(concat!(env!("OUT_DIR"), "/speech_dispatcher_sys.rs"));

View File

@ -0,0 +1,2 @@
#include <speech-dispatcher/libspeechd.h>
#include <speech-dispatcher/libspeechd_version.h>

View File

@ -0,0 +1,10 @@
[package]
name = "speech-dispatcher"
version = "0.4.0"
authors = ["Nolan Darilek <nolan@thewordnerd.info>"]
repository = "https://gitlab.com/ndarilek/speech-dispatcher-rs"
description = "Rusty interface to the speech-dispatcher speech synthesis library"
license = "LGPL-2.1"
[dependencies]
speech-dispatcher-sys = { path = "../speech-dispatcher-sys" }

View File

@ -0,0 +1,2 @@
#include <speech-dispatcher/libspeechd.h>
#include <speech-dispatcher/libspeechd_version.h>