Skip to content
This repository was archived by the owner on Mar 27, 2024. It is now read-only.

Commit ab74a56

Browse files
authored
Add the deprecated attribute to the Plugin trait (#195)
So you can't miss it. The `disable_deprecation_warning` feature can be used to disable the warning if the user has a really good reason to still use the `vst` crate, but it's intentionally undocumented.
1 parent dc88adb commit ab74a56

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ keywords = ["vst", "vst2", "plugin"]
3030

3131
autoexamples = false
3232

33+
[features]
34+
default = []
35+
disable_deprecation_warning = []
36+
3337
[dependencies]
3438
log = "0.4"
3539
num-traits = "0.2"

src/plugin.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ impl Into<String> for CanDo {
469469
/// processing thread. For this reason, the plugin API is separated into two
470470
/// traits: The `Plugin` trait containing setup and processing methods, and
471471
/// the `PluginParameters` trait containing methods for parameter access.
472+
#[cfg_attr(
473+
not(feature = "disable_deprecation_warning"),
474+
deprecated = "This crate has been deprecated. See https://github.com/RustAudio/vst-rs for more information."
475+
)]
472476
#[allow(unused_variables)]
473477
pub trait Plugin: Send {
474478
/// This method must return an `Info` struct.

0 commit comments

Comments
 (0)