Fix 5: Allow backward-compatibility and add plugin-template-v2
This commit is contained in:
parent
2b898d6f22
commit
d0003534a0
12 changed files with 568 additions and 60 deletions
|
|
@ -152,7 +152,7 @@ unsafe fn load_plugin(path: &Path) -> Result<Box<dyn BuiltinPlugin>, Box<dyn std
|
|||
.get(b"ocs_plugin_api_version")
|
||||
.map_err(|_| "missing ocs_plugin_api_version symbol")?;
|
||||
let v = version();
|
||||
if v < crate::API_VERSION_MIN_SUPPORTED || v > crate::API_VERSION {
|
||||
if !crate::host_accepts_plugin_version(v) {
|
||||
return Err(format!(
|
||||
"API version {v} is incompatible (host supports {}-{})",
|
||||
crate::API_VERSION_MIN_SUPPORTED,
|
||||
|
|
|
|||
Loading…
Reference in a new issue