forked from 1b-agent/opencadstudio-upstream
refactor: replace build.rs module codegen with a static registry
The core ribbon registry no longer needs build-time generation. Replace the generated all_modules() (included from OUT_DIR) with a hand-written static list in src/modules/registry.rs, listing the seven built-in tabs in display order. Trim build.rs down to its only remaining job: embedding the Windows executable icon via winresource (issue #107). The external plugin system is unaffected — plugin::registry still appends dynamically-loaded add-on tabs on top of the core list. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
1 parent
415dbe08d4
commit
7cb666801f
3 files changed
+31
-96
No files matched your search
+3
-3
@@ -4,7 +4,7 @@
|
||||
// 1. Create `src/modules/my_name/` directory (no `plugin.toml`)
|
||||
// 2. Add `src/modules/my_name/mod.rs` implementing `CadModule` as `MyNameModule`
|
||||
// 3. Add `pub mod my_name;` below
|
||||
// 4. `cargo build` — tab appears via build.rs registry
|
||||
// 4. Add a `Box::new(my_name::MyNameModule)` line in `registry::all_modules()`
|
||||
//
|
||||
// To add an **add-on plugin** (Storm Sewer, …):
|
||||
// See `docs/plugin-architecture.md` and copy `docs/plugin-template/`.
|
||||
@@ -32,6 +32,6 @@ pub mod layout;
|
||||
pub mod manage;
|
||||
pub mod view;
|
||||
|
||||
// ── Auto-generated module registry ───────────────────────────────────────
|
||||
// build.rs writes this file; it contains only `all_modules()`.
|
||||
// ── Core module registry ─────────────────────────────────────────────────
|
||||
// Hand-written `all_modules()` listing the built-in ribbon tabs.
|
||||
pub mod registry;
|
||||
Reference in new issue
Block a user