forked from 1b-agent/opencadstudio-upstream
Fix 5: Allow backward-compatibility and add plugin-template-v2
This commit is contained in:
1 parent
2b898d6f22
commit
d0003534a0
12 files changed
+568
-60
No files matched your search
@@ -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::*;
|
||||
|
||||
Reference in new issue
Block a user