Switch to a workspace.
This commit is contained in:
parent
e919820f9d
commit
3da5140735
14
Cargo.toml
14
Cargo.toml
|
@ -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
Normal file
11
speech-dispatcher-sys/Cargo.toml
Normal 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"
|
23
speech-dispatcher-sys/build.rs
Normal file
23
speech-dispatcher-sys/build.rs
Normal 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"));
|
||||
}
|
7
speech-dispatcher-sys/src/lib.rs
Normal file
7
speech-dispatcher-sys/src/lib.rs
Normal 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"));
|
2
speech-dispatcher-sys/wrapper.h
Normal file
2
speech-dispatcher-sys/wrapper.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include <speech-dispatcher/libspeechd.h>
|
||||
#include <speech-dispatcher/libspeechd_version.h>
|
10
speech-dispatcher/Cargo.toml
Normal file
10
speech-dispatcher/Cargo.toml
Normal 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" }
|
2
speech-dispatcher/wrapper.h
Normal file
2
speech-dispatcher/wrapper.h
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include <speech-dispatcher/libspeechd.h>
|
||||
#include <speech-dispatcher/libspeechd_version.h>
|
Loading…
Reference in New Issue
Block a user