docs(plugin): rewrite architecture + template for the external-only model
OpenCADStudio ships no built-in plugins, so the spec and scaffold no longer describe the in-tree inventory path, demo_plugin, or the fictional Storm Sewer reference. The architecture doc now covers the external cdylib model end to end (ocs_plugin_api contract, export_plugin!, building + publishing per-platform releases, runtime loading, the marketplace + curated registry, the approach-B ABI caveat). The template becomes a standalone cdylib crate (Cargo.toml + src/lib.rs + release workflow) instead of an in-tree module. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
157412419e
commit
1175675c5e
10 changed files with 399 additions and 361 deletions
19
docs/plugin-template/Cargo.toml
Normal file
19
docs/plugin-template/Cargo.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[package]
|
||||
name = "my-plugin"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "An Open CAD Studio add-on."
|
||||
license = "GPL-3.0-only"
|
||||
|
||||
# A plugin is a C-ABI dynamic library the host loads at runtime.
|
||||
[lib]
|
||||
crate-type = ["cdylib"]
|
||||
|
||||
[dependencies]
|
||||
# The stable contract, with the runtime `host` surface (HostApi / BuiltinPlugin).
|
||||
ocs_plugin_api = { git = "https://github.com/HakanSeven12/OpenCADStudio", features = ["host"] }
|
||||
|
||||
# Match the host's acadrust so the loaded library is binary-compatible
|
||||
# (approach B assumes the same toolchain + dependency versions).
|
||||
[patch.crates-io]
|
||||
acadrust = { git = "https://github.com/HakanSeven12/acadrust", branch = "main" }
|
||||
Loading…
Reference in a new issue