Fix 5: Allow backward-compatibility and add plugin-template-v2

This commit is contained in:
Sebastian authored and Hakan Seven committed 2026-06-25 00:02:17 +03:00
1 parent 2b898d6f22
commit d0003534a0
12 files changed
+568 -60

No files matched your search

+7
View File
@@ -28,6 +28,13 @@ impl ApiVersion {
}
}
/// True when a plugin built against `plugin_major` can be loaded by this host.
/// The host supports majors from `API_VERSION_MIN_SUPPORTED` up to
/// `API_VERSION`.
pub fn host_accepts_plugin_version(plugin_major: u32) -> bool {
plugin_major >= API_VERSION_MIN_SUPPORTED && plugin_major <= API_VERSION
}
#[cfg(test)]
mod tests {
use super::*;