fix(plugins): enforce rustc compatibility

BREAKING CHANGE: API v4+ plugin packages must declare the exact rustc version used to build the binary.

Refs #901
This commit is contained in:
Hakan Seven committed 2026-08-29 15:54:41 +03:00
1 parent 4668042df5
commit 466ab99c63
9 files changed
+23 -40

No files matched your search

+7 -7
View File
@@ -99,10 +99,10 @@ affect whether a prebuilt plugin can safely be loaded:
- `rustc_version` — the output of `rustc --version` for the compiler that built
the host.
A plugin's `plugin.toml` may declare the same values under `[opencad]`. When
either is declared, the host refuses to load the plugin unless it matches the
host exactly. This turns the current silent runner crash into a one-line
diagnosis such as:
A plugin's `plugin.toml` declares the same values under `[opencad]`. For API v4
and later, `rustc_version` is required and the host refuses to load the plugin
unless it matches exactly. This turns the current silent runner crash into a
one-line diagnosis such as:
```
Plugin built with rustc 1.96.0, host requires 1.98.0 - rebuild required
@@ -229,12 +229,12 @@ version = "0.1.0"
description = "…"
[opencad]
api_version = 3
api_version = 4
ribbon_order = 50
command_prefixes = ["EX_"]
xdata_apps = []
# For API v4+, also record the exact rustc used to build the release asset.
# rustc_version = "rustc 1.98.0 (hash date)"
# Filled with the exact compiler output while staging the release asset.
rustc_version = "rustc 1.98.0 (hash date)"
```
The full, buildable scaffold is in [`docs/plugin-template/`](plugin-template);