feat(plugin): 集成 WASM 插件系统到主服务并修复链路问题
- 新增 erp-plugin crate:插件管理、WASM 运行时、动态表、数据 CRUD - 新增前端插件管理页面(PluginAdmin/PluginCRUDPage)和 API 层 - 新增插件数据迁移(plugins/plugin_entities/plugin_event_subscriptions) - 新增权限补充迁移(为已有租户补充 plugin.admin/plugin.list 权限) - 修复 PluginAdmin 页面 InstallOutlined 图标不存在的崩溃问题 - 修复 settings 唯一索引迁移顺序错误(先去重再建索引) - 更新 wiki 和 CLAUDE.md 反映插件系统集成状态 - 新增 dev.ps1 一键启动脚本
This commit is contained in:
24
crates/erp-plugin/src/lib.rs
Normal file
24
crates/erp-plugin/src/lib.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
//! ERP WASM 插件运行时 — 生产级 Host API
|
||||
//!
|
||||
//! 完整插件管理链路:加载 → 初始化 → 运行 → 停用 → 卸载
|
||||
|
||||
// bindgen! 生成类型化绑定(包含 Host trait 和 PluginWorld 类型)
|
||||
// 生成: erp::plugin::host_api::Host trait, PluginWorld 类型
|
||||
wasmtime::component::bindgen!({
|
||||
path: "wit/plugin.wit",
|
||||
world: "plugin-world",
|
||||
});
|
||||
|
||||
pub mod data_dto;
|
||||
pub mod data_service;
|
||||
pub mod dynamic_table;
|
||||
pub mod dto;
|
||||
pub mod engine;
|
||||
pub mod entity;
|
||||
pub mod error;
|
||||
pub mod handler;
|
||||
pub mod host;
|
||||
pub mod manifest;
|
||||
pub mod module;
|
||||
pub mod service;
|
||||
pub mod state;
|
||||
Reference in New Issue
Block a user