Update codec and kernel dependencies

This commit is contained in:
Hakan Seven committed 2026-09-11 18:52:31 +03:00
1 parent e86c045988
commit 5e91e23752
8 files changed
+29 -27

No files matched your search

+3 -1
View File
@@ -5,9 +5,11 @@ edition = "2021"
description = "Example OpenCAD Studio plugin demonstrating the shared-memory DocumentReader API."
license = "GPL-3.0-only"
[workspace]
[lib]
crate-type = ["cdylib"]
[dependencies]
ocs_plugin_api = { path = "../../crates/ocs_plugin_api", features = ["host"] }
acadrust = "0.3.4"
acadrust = { git = "https://github.com/HakanSeven12/cadcodec.git", rev = "6d88d702b664685fead738095d778cf6e5a36119" }
+2 -5
View File
@@ -5,6 +5,8 @@ edition = "2021"
description = "An Open CAD Studio add-on."
license = "GPL-3.0-only"
[workspace]
# A plugin is a C-ABI dynamic library the host loads at runtime.
[lib]
crate-type = ["cdylib"]
@@ -12,8 +14,3 @@ 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" }
+13 -10
View File
@@ -30,16 +30,19 @@ impl CadModule for MyModule {
fn title(&self) -> &'static str {
"My Plugin"
}
fn ribbon_groups(&self) -> Vec<RibbonGroup> {
vec![RibbonGroup {
title: "Tools",
tools: vec![RibbonItem::LargeTool(ToolDef {
id: "MP_HELLO",
label: "Hello",
icon: IconKind::Glyph("★"),
event: ModuleEvent::Command("MP_HELLO".to_string()),
})],
}]
fn ribbon_groups(&self) -> &[RibbonGroup] {
static GROUPS: std::sync::OnceLock<Vec<RibbonGroup>> = std::sync::OnceLock::new();
GROUPS.get_or_init(|| {
vec![RibbonGroup {
title: "Tools",
tools: vec![RibbonItem::LargeTool(ToolDef {
id: "MP_HELLO",
label: "Hello",
icon: IconKind::Glyph("★"),
event: ModuleEvent::Command("MP_HELLO".to_string()),
})],
}]
})
}
}