Browse Source

Switch to a workspace.

merge-requests/1/head
Nolan Darilek 3 years ago
parent
commit
3da5140735
  1. 14
      Cargo.toml
  2. 11
      speech-dispatcher-sys/Cargo.toml
  3. 23
      speech-dispatcher-sys/build.rs
  4. 7
      speech-dispatcher-sys/src/lib.rs
  5. 2
      speech-dispatcher-sys/wrapper.h
  6. 10
      speech-dispatcher/Cargo.toml
  7. 0
      speech-dispatcher/examples/hello_world.rs
  8. 0
      speech-dispatcher/src/lib.rs
  9. 2
      speech-dispatcher/wrapper.h

14
Cargo.toml

@ -1,10 +1,6 @@ @@ -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"
]

11
speech-dispatcher-sys/Cargo.toml

@ -0,0 +1,11 @@ @@ -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"

23
speech-dispatcher-sys/build.rs

@ -0,0 +1,23 @@ @@ -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"));
}

7
speech-dispatcher-sys/src/lib.rs

@ -0,0 +1,7 @@ @@ -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"));

2
speech-dispatcher-sys/wrapper.h

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

10
speech-dispatcher/Cargo.toml

@ -0,0 +1,10 @@ @@ -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" }

0
examples/hello_world.rs → speech-dispatcher/examples/hello_world.rs

0
src/lib.rs → speech-dispatcher/src/lib.rs

2
speech-dispatcher/wrapper.h

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