Skip to content

Commit 11bea12

Browse files
committed
Add optional features to match those offered by coreaudio-sys
An optional feaure per framework is now provided for more granular control over the framework linking. Note that at last one feature must be enabled at all times or coreaudio-sys and coreaudio-rs will fail to compile.
1 parent f598fa1 commit 11bea12

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Cargo.toml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coreaudio-rs"
3-
version = "0.8.0"
3+
version = "0.8.1"
44
authors = ["mitchmindtree <mitchell.nordine@gmail.com>", "yupferris <jake@fusetools.com>"]
55
description = "A friendly rust interface for Apple's CoreAudio API."
66
keywords = ["core", "audio", "unit", "osx", "ios"]
@@ -12,6 +12,14 @@ homepage = "https://github.com/RustAudio/coreaudio-rs"
1212
[lib]
1313
name = "coreaudio"
1414

15+
[features]
16+
default = ["audio_toolbox", "audio_unit", "core_audio", "open_al", "core_midi"]
17+
audio_toolbox = ["coreaudio-sys/audio_toolbox"]
18+
audio_unit = ["coreaudio-sys/audio_unit"]
19+
core_audio = ["coreaudio-sys/core_audio"]
20+
open_al = ["coreaudio-sys/open_al"]
21+
core_midi = ["coreaudio-sys/core_midi"]
22+
1523
[dependencies]
1624
bitflags = "1.0"
17-
coreaudio-sys = "0.2"
25+
coreaudio-sys = { version = "0.2", default-features = false }

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ pub extern crate coreaudio_sys as sys;
1313

1414
pub use error::Error;
1515

16+
#[cfg(feature = "audio_unit")]
1617
pub mod audio_unit;
1718
pub mod error;

0 commit comments

Comments
 (0)