{"id":23553357,"url":"https://github.com/geofmureithi/plugy","last_synced_at":"2025-04-05T01:05:30.695Z","repository":{"id":187002726,"uuid":"673952203","full_name":"geofmureithi/plugy","owner":"geofmureithi","description":"plugy empowers you to construct agnostic dynamic plugin systems using Rust and WebAssembly. ","archived":false,"fork":false,"pushed_at":"2025-03-28T22:36:45.000Z","size":225,"stargazers_count":60,"open_issues_count":16,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T00:07:35.803Z","etag":null,"topics":["plugin-system","rust","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geofmureithi.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":"2023-08-02T19:52:59.000Z","updated_at":"2025-02-03T21:49:23.000Z","dependencies_parsed_at":"2023-09-27T18:15:00.870Z","dependency_job_id":"7a8c50f0-3865-49f9-a000-23d94968118d","html_url":"https://github.com/geofmureithi/plugy","commit_stats":{"total_commits":86,"total_committers":4,"mean_commits":21.5,"dds":0.5,"last_synced_commit":"0fb58db3fe742ce5e84059b49de7af2291d5dbb9"},"previous_names":["geofmureithi/plugy"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geofmureithi%2Fplugy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geofmureithi%2Fplugy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geofmureithi%2Fplugy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geofmureithi%2Fplugy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geofmureithi","download_url":"https://codeload.github.com/geofmureithi/plugy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271522,"owners_count":20911587,"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":["plugin-system","rust","wasm","webassembly"],"created_at":"2024-12-26T11:14:54.353Z","updated_at":"2025-04-05T01:05:30.678Z","avatar_url":"https://github.com/geofmureithi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./assets/logo.svg\" width=\"100%\"\u003e\n\n[![GitHub Actions][github-actions-badge]](https://github.com/geofmureithi/plugy/actions)\n[![GitHub Releases][github-release-svg]][github-release]\n\n# plugy\n\nplugy is a plugin system designed to enable the seamless integration of Rust-based plugins into your application. It provides a runtime environment for loading and executing plugins written in WebAssembly (Wasm), enabling dynamic extensibility and modularity in your Rust projects.\n\n## Features\n\n- Load and execute plugins compiled to WASM.\n- Flexible runtime management of plugins.\n- Calls to plugin functions are async.\n- Easy-to-use macros for generating plugin interfaces.\n\n## Getting Started\n\nTo use plugy in your Rust project, follow these steps:\n\n1. Write your plugin trait:\n\n```rust,ignore\n#[plugy::plugin]\ntrait Greeter {\n    fn greet(\u0026self) -\u003e String;\n}\n```\n\n2. Write your first plugin implementation\n\n```rust,ignore\n#[derive(Debug, Deserialize)]\nstruct FooPlugin;\n\n#[plugin_impl]\nimpl Greeter for FooPlugin {\n    fn greet(\u0026self) -\u003e String {\n        \"Hello From Foo Plugin\".to_owned()\n    }\n}\n```\n\nCompile it!\n\n```bash,ignore\ncargo build --target wasm32-unknown-unknown\n```\n\n3. Import and run\n\n```rust,ignore\n#[plugin_import(file = \"target/wasm32-unknown-unknown/debug/foo_plugin.wasm\")]\nstruct FooPlugin;\n\n#[tokio::main]\nasync fn main() {\n    let runtime = Runtime::\u003cBox\u003cdyn Greeter\u003e\u003e::new().unwrap();\n    let handle = runtime.load(FooPlugin).await.unwrap();\n    let res = handle.greet().await;\n    assert_eq!(res, \"Hello From Foo Plugin\")\n}\n```\n\nAnd you are set!\n\n## Examples\n\nCheck out the [examples](./examples/) directory for sample usage of plugy.\n\n## Milestones\n\n| Status | Goal                                                                                                | Labels     |\n| :----: | :-------------------------------------------------------------------------------------------------- | ---------- |\n|   ✅   | [accept multiple arity (n-ary) in plugin functions](https://github.com/geofmureithi/plugy/issues/2) | `complete` |\n|   ✅   | [pass down context between host and guest](https://github.com/geofmureithi/plugy/issues/3)          | `complete`  |\n\n## Functionality\n\nPlugy comprises three fundamental crates, each serving a distinct role in crafting dynamic plugin systems with Rust and WebAssembly:\n- core: This crate houses essential components such as bitwise utilities and the guest module, forming the foundation of Plugy's functionality.\n\n- runtime: The runtime crate orchestrates the execution of your plugin system, allowing seamless integration of plugins into your applications.\n\n- macros: The macros crate offers a collection of macros that simplify the generation of bindings and interfaces, streamlining the process of working with dynamic plugins.\n\n## Contributing\n\nContributions to plugy are welcome! If you find a bug or want to propose a new feature, feel free to create an issue or submit a pull request.\n\n### Thanks to\n\n- [Wasmtime](https://wasmtime.dev/)\n- Bincode\n- Serde\n- [Wasmtime-Serde](https://github.com/Heraclito-Q-Saldanha/wasmtime_serde) inspired alot of the inner working of this project\n\nLicense\n\nThis project is licensed under the MIT OR Apache-2.0 License.\n\n\u003c!-- Badges --\u003e\n\n[github-actions-badge]: https://github.com/geofmureithi/plugy/actions/workflows/build.yml/badge.svg\n[github-release]: https://github.com/geofmureithi/plugy/releases\n[github-release-svg]: https://img.shields.io/github/release/geofmureithi/plugy.svg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeofmureithi%2Fplugy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeofmureithi%2Fplugy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeofmureithi%2Fplugy/lists"}