{"id":49370708,"url":"https://github.com/olivegamestudio/eventweave","last_synced_at":"2026-04-27T23:00:50.669Z","repository":{"id":352926842,"uuid":"1217214135","full_name":"olivegamestudio/EventWeave","owner":"olivegamestudio","description":"Lightweight event aggregation with zero dependencies. Pub/sub messaging for decoupled service-to-service communication.","archived":false,"fork":false,"pushed_at":"2026-04-21T18:02:22.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-21T19:43:05.747Z","etag":null,"topics":["communitytoolkit-mvvm","csharp","decoupled","event","event-aggregator","events","godot","pubsub","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olivegamestudio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-21T16:56:08.000Z","updated_at":"2026-04-21T18:02:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/olivegamestudio/EventWeave","commit_stats":null,"previous_names":["olivegamestudio/eventweave"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/olivegamestudio/EventWeave","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivegamestudio%2FEventWeave","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivegamestudio%2FEventWeave/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivegamestudio%2FEventWeave/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivegamestudio%2FEventWeave/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olivegamestudio","download_url":"https://codeload.github.com/olivegamestudio/EventWeave/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olivegamestudio%2FEventWeave/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32358509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-27T20:07:02.737Z","status":"ssl_error","status_checked_at":"2026-04-27T20:07:00.910Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["communitytoolkit-mvvm","csharp","decoupled","event","event-aggregator","events","godot","pubsub","unity"],"created_at":"2026-04-27T23:00:48.188Z","updated_at":"2026-04-27T23:00:50.656Z","avatar_url":"https://github.com/olivegamestudio.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EventWeave\n\nLightweight event aggregation for .NET. Zero dependencies. Decoupled pub/sub messaging between services.\n\n## Why\n\nWhen services need to communicate without knowing about each other, you need a message bus. EventWeave provides a minimal `IEventAggregator` that handles subscription, publication, and cleanup — with weak references to prevent memory leaks.\n\nNo frameworks. No reflection. No magic. Just pub/sub.\n\n## Install\n\n```\ndotnet add package EventWeave\ndotnet add package EventWeave.CommunityToolkit\n```\n\n## Install into Unity\n\nIn `Package Manager` add the following git url:\n\n```\nhttps://github.com/olivegamestudio/EventWeave.git?path=/upm\n```\n\n## Quick start\n\nDefine a message as a record:\n\n```csharp\npublic sealed record OrderPlacedMessage(int OrderId, decimal Total);\n```\n\nSubscribe:\n\n```csharp\npublic sealed class NotificationService\n{\n    public NotificationService(IEventAggregator events)\n    {\n        events.Subscribe\u003cOrderPlacedMessage\u003e(this, OnOrderPlaced);\n    }\n\n    void OnOrderPlaced(OrderPlacedMessage message)\n    {\n        // send notification\n    }\n}\n```\n\nPublish:\n\n```csharp\npublic sealed class OrderService\n{\n    readonly IEventAggregator _events;\n\n    public OrderService(IEventAggregator events)\n    {\n        _events = events;\n    }\n\n    public void PlaceOrder(int orderId, decimal total)\n    {\n        // process order\n        _events.Publish(new OrderPlacedMessage(orderId, total));\n    }\n}\n```\n\nUnsubscribe when done:\n\n```csharp\nevents.Unsubscribe(this);\n```\n\n## Setup\n\n### Standalone (no DI)\n\n```csharp\nIEventAggregator events = new EventAggregator();\n```\n\n### Microsoft DI\n\n```csharp\nservices.AddSingleton\u003cIEventAggregator, EventAggregator\u003e();\n```\n\n### CommunityToolkit.Mvvm adapter\n\nIf you already use `IMessenger` in your presentation layer and want EventWeave in your application layer:\n\n```\ndotnet add package EventWeave.CommunityToolkit\n```\n\n```csharp\nservices.AddSingleton\u003cIMessenger, WeakReferenceMessenger\u003e();\nservices.AddSingleton\u003cIEventAggregator, MessengerEventAggregator\u003e();\n```\n\n## Diagnostics\n\n`Publish` automatically captures caller information for debugging:\n\n```csharp\npublic interface IEventAggregator\n{\n    void Publish\u003cTMessage\u003e(\n        TMessage message,\n        [CallerMemberName] string? caller = null,\n        [CallerFilePath] string? file = null)\n        where TMessage : class;\n}\n```\n\n## Packages\n\n| Package | Purpose |\n|---|---|\n| `EventWeave` | Core library. `IEventAggregator`, `EventAggregator`. Zero dependencies, netstandard2.0. |\n| `EventWeave.CommunityToolkit` | Adapter `MessengerEventAggregator` wrapping `IMessenger` from CommunityToolkit.Mvvm. |\n\n## Design principles\n\n- **Zero dependencies** in the core package. Runs on .NET Framework 4.6.2, .NET 10, Unity, MonoGame — anywhere netstandard2.0 works.\n- **Thread safe.** Subscriptions and publications are safe to call from any thread.\n- **No reflection.** All wiring is explicit or source-generated.\n- **Messages are records.** Immutable, equatable, pattern-matchable.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivegamestudio%2Feventweave","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folivegamestudio%2Feventweave","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folivegamestudio%2Feventweave/lists"}