From 9046cfbe3ac6a4d488ed8620d2b81750c12beb73 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Wed, 26 Jan 2022 22:20:15 +0100 Subject: [PATCH] Add a version string constant --- plugins/gain/src/lib.rs | 1 + src/plugin.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/plugins/gain/src/lib.rs b/plugins/gain/src/lib.rs index 7a648bf5..c5f2c3be 100644 --- a/plugins/gain/src/lib.rs +++ b/plugins/gain/src/lib.rs @@ -66,6 +66,7 @@ impl Plugin for Gain { const URL: &'static str = "https://youtu.be/dQw4w9WgXcQ"; const EMAIL: &'static str = "info@example.com"; + const VERSION: &'static str = "0.0.1"; const VST3_CATEGORIES: &'static str = "Fx|Dynamics"; const DEFAULT_NUM_INPUTS: u32 = 2; diff --git a/src/plugin.rs b/src/plugin.rs index c14040a5..ca41ba41 100644 --- a/src/plugin.rs +++ b/src/plugin.rs @@ -42,6 +42,9 @@ pub trait Plugin: Default + Sync { const URL: &'static str; const EMAIL: &'static str; + /// Semver compatible version string (e.g. `0.0.1`). Hosts likely won't do anything with this, + /// but just in case they do this should only contain decimals values and dots. + const VERSION: &'static str; /// One or more categories, separated by pipe characters (`|`), up to 127 characters. Anything /// logner than that will be truncated. See the VST3 SDK for examples of common categories: /// https://github.com/steinbergmedia/vst3_pluginterfaces/blob/2ad397ade5b51007860bedb3b01b8afd2c5f6fba/vst/ivstaudioprocessor.h#L49-L90