forked from 1b-agent/opencadstudio-upstream
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:
1 parent
4668042df5
commit
466ab99c63
9 files changed
+23
-40
No files matched your search
+1
-1
@@ -36,7 +36,7 @@ jobs:
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/*.${{ matrix.ext }} "dist/${{ matrix.asset }}"
|
||||
cp plugin.toml dist/plugin.toml
|
||||
sed "s|__RUSTC_VERSION__|$(rustc --version)|" plugin.toml > dist/plugin.toml
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
|
||||
@@ -28,7 +28,8 @@ folder into a new repo and rename the placeholders.
|
||||
cargo build --release
|
||||
mkdir -p "<config>/OpenCADStudio/plugins/opencad.my_plugin"
|
||||
cp target/release/*my_plugin*.so "<config>/OpenCADStudio/plugins/opencad.my_plugin/"
|
||||
cp plugin.toml "<config>/OpenCADStudio/plugins/opencad.my_plugin/"
|
||||
sed "s|__RUSTC_VERSION__|$(rustc --version)|" plugin.toml > \
|
||||
"<config>/OpenCADStudio/plugins/opencad.my_plugin/plugin.toml"
|
||||
```
|
||||
|
||||
Restart Open CAD Studio: the ribbon tab appears and `MP_` commands route to your
|
||||
|
||||
@@ -8,7 +8,8 @@ license = "GPL-3.0-only"
|
||||
repository = "your-account/your-plugin-repo"
|
||||
|
||||
[opencad]
|
||||
api_version = 3
|
||||
api_version = 4
|
||||
rustc_version = "__RUSTC_VERSION__"
|
||||
ribbon_order = 60
|
||||
command_prefixes = ["MP_"]
|
||||
xdata_apps = ["MYPLUGIN_RECORD"]
|
||||
Reference in new issue
Block a user