Conversation
|
如果跨多个组件,请使用主要组件作为前缀,并在标题中枚举、描述中说明。 |
There was a problem hiding this comment.
Pull Request Overview
This PR implements a comprehensive plugin system based on WebAssembly (WASI) for OpenList, enabling dynamic loading of storage driver plugins. The implementation includes a plugin manager with installation/uninstallation capabilities, WASI host bindings, and API endpoints for plugin management.
- Adds complete plugin management infrastructure with database persistence
- Implements WebAssembly runtime integration for driver plugins
- Provides REST API endpoints for plugin lifecycle operations
Reviewed Changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| server/router.go | Adds new API route group for plugin management endpoints |
| server/handles/plugin.go | Implements HTTP handlers for plugin CRUD operations |
| internal/plugin/manager.go | Core plugin manager with install/uninstall/update functionality |
| internal/plugin/driver.go | WebAssembly driver implementation and WASI bindings |
| internal/plugin/host.go | Host-side WASI interface implementations |
| internal/plugin/warp/*.go | Type definitions and converters for plugin communication |
| internal/db/plugin.go | Database operations for plugin persistence |
| internal/model/plugin.go | Plugin data model definition |
| go.mod | Adds WebAssembly runtime dependencies |
| cmd/common.go | Integrates plugin initialization into startup sequence |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| case hash_extend.GCID: | ||
| return HashAlg{GCID: &struct{}{}} | ||
| } | ||
| panic("plase add hash convert") |
There was a problem hiding this comment.
Corrected spelling of 'plase' to 'please'.
| } else if hash.GCID != nil { | ||
| return hash_extend.GCID | ||
| } | ||
| panic("plase add hash convert") |
There was a problem hiding this comment.
Corrected spelling of 'plase' to 'please'.
…ter for stream management
一个基于 WASI (WebAssembly) 的存储驱动插件化方案。
主仓库
核心技术栈
运行时: [OpenListTeam/wazero-wasip2](https://github.com/OpenListTeam/wazero-wasip2)
WASI HTTP: [OpenListTeam/go-wasi-http](https://github.com/OpenListTeam/go-wasi-http)
WASI Sockets: [OpenListTeam/go-wasi-socket](https://github.com/OpenListTeam/go-wasi-socket)
Guest SDK + WIT: [OpenListTeam/openlist-wasi-plugin-driver](https://github.com/OpenListTeam/openlist-wasi-plugin-driver)
参考插件实现
代码分支
🗺️ 下一步开发计划
1. 近期目标
wazero-wasip2中的生命周期管理和可能的时序错误,避免资源泄漏。wasi-http的超时设置。2. 长期目标
wazero-wasip2性能。