{"id":28690714,"url":"https://github.com/pixeval/pixeval.extensions","last_synced_at":"2025-06-14T06:07:10.418Z","repository":{"id":270381751,"uuid":"909307014","full_name":"Pixeval/Pixeval.Extensions","owner":"Pixeval","description":"Pixeval的兼容AOT插件系统","archived":false,"fork":false,"pushed_at":"2025-03-29T08:29:51.000Z","size":138,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-29T09:27:21.468Z","etag":null,"topics":["aot","com","csharp","dotnet","extension","plugin"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pixeval.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-28T10:04:39.000Z","updated_at":"2025-03-29T08:29:55.000Z","dependencies_parsed_at":"2024-12-30T18:35:22.136Z","dependency_job_id":"71b39029-d4ff-4ae6-9754-8c0e3851cae5","html_url":"https://github.com/Pixeval/Pixeval.Extensions","commit_stats":null,"previous_names":["pixeval/pixeval.extensions"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/Pixeval/Pixeval.Extensions","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixeval%2FPixeval.Extensions","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixeval%2FPixeval.Extensions/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixeval%2FPixeval.Extensions/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixeval%2FPixeval.Extensions/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pixeval","download_url":"https://codeload.github.com/Pixeval/Pixeval.Extensions/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixeval%2FPixeval.Extensions/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259768620,"owners_count":22908231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aot","com","csharp","dotnet","extension","plugin"],"created_at":"2025-06-14T06:07:06.921Z","updated_at":"2025-06-14T06:07:10.408Z","avatar_url":"https://github.com/Pixeval.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pixeval.Extensions\n\n本项目是Pixeval扩展功能的工具项目，被主项目（下称[Pixeval](https://github.com/Pixeval/Pixeval/)）高强度依赖，所以本项目会和Pixeval同步迭代（使用相同的版本号）。\n\n本项目通过NuGet进行分发，在NuGet上有两个包：\n\n- [Pixeval.Extensions.Common](https://www.nuget.org/packages/Pixeval.Extensions.Common/)：这个包声明了Pixeval与扩展进行通信使用的接口，和一些简单的工具类。这个包会被Pixeval和下面的SDK包引用。\n- [Pixeval.Extensions.SDK](https://www.nuget.org/packages/Pixeval.Extensions.SDK/)：这个包对上一个包的接口进行了封装，降低了编写扩展的难度和工作量。扩展的开发者应该引用这个包。\n\n## 关于向后兼容\n\n本项目正处于早期开发阶段，不能保证向后兼容，但遇到相关问题欢迎与[我](https://github.com/Poker-sang)商讨( •̀ ω •́ )✧。\n\nC#/.NET的extension类型对本项目帮助很大，在extension功能发布后势必要对本项目进行全方位的优化，但也会尽量保持向前兼容。\n\n## 关于扩展系统使用的技术\n\n为了方便以后将Pixeval改写为AOT项目，Pixeval的扩展系统要求加载的扩展也是AOT的，所以扩展系统选择了COM + P/Invoke的技术实现。\n\n.NET在8.0版本才实现了[完全支持AOT的COM技术](https://learn.microsoft.com/zh-cn/dotnet/standard/native-interop/com-wrappers)，所以本项目最低支持的.NET SDK是.NET 8。\n\n由于AOT和COM系统的局限性，项目中几乎不能使用反射技术，通信时也不能使用复杂的类型（只有接口和方法，这也是为什么需要SDK项目），但好在除此之外的其他技术并没有多少限制。\n\n理论上来说本扩展系统可以加载任何不需要运行时的扩展文件（尤其是C++），但我目前还没有为其他语言写工具库，所以实际用除C#之外的语言开发可能会遇到很多困难。\n\n## 扩展案例\n\n- [Pixeval.Extensions.Sample](https://github.com/Pixeval/Pixeval.Extensions/tree/master/src/Pixeval.Extensions.Sample)：本项目自带的简单扩展示例\n- [Pixeval.Extensions.Upscaler](https://github.com/Pixeval/Pixeval.Extensions.Upscaler)：Pixeval AI提升画质插件\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixeval%2Fpixeval.extensions","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixeval%2Fpixeval.extensions","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixeval%2Fpixeval.extensions/lists"}