forked from 1b-agent/opencadstudio-upstream
Add versioned host settings API for plugins
This commit is contained in:
1 parent
93afe91afc
commit
ec2271fc9c
13 files changed
+218
-17
No files matched your search
@@ -44,12 +44,14 @@ The host and each plugin run in separate OS processes. The host re-executes itse
|
||||
|
||||
## Versioning and ABI stability
|
||||
|
||||
- `API_VERSION` (currently `5`) is the host's advertised major.
|
||||
- `API_VERSION` (currently `6`) is the host's advertised major.
|
||||
- `API_VERSION_MIN_SUPPORTED` (currently `2`) is the oldest plugin major the host loads.
|
||||
- `OCS_PLUGIN_MAX_API_VERSION` can cap the accepted major at runtime (e.g. `4` to disable V5).
|
||||
- `OCS_PLUGIN_MAX_API_VERSION` can cap the accepted major at runtime (e.g. `5` to disable V6).
|
||||
- A plugin built against major `N` runs on a host whose major is `>= N` because new vtable entries and enum variants are appended at the end.
|
||||
- V4 introduces the **acadrust gate**: plugins targeting API v4 or later must resolve the same `acadrust` source as the host (see [`src/version_info.rs`](src/version_info.rs)).
|
||||
- V5 introduces `BuiltinPlugin::on_load` and tab-keyed document paths.
|
||||
- V6 appends typed system-variable access to `HostApi`; the fork currently
|
||||
supports `CLAYER` and `SNAPANG`.
|
||||
|
||||
The runtime enforces three gates:
|
||||
|
||||
|
||||
Reference in new issue
Block a user