{"id":16264978,"url":"https://github.com/ickshonpe/commands_send_event","last_synced_at":"2026-04-28T11:02:03.854Z","repository":{"id":57609093,"uuid":"467015786","full_name":"ickshonpe/commands_send_event","owner":"ickshonpe","description":"Send Bevy Events generically through Commands","archived":false,"fork":false,"pushed_at":"2022-11-16T08:15:44.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T04:53:08.658Z","etag":null,"topics":["bevy"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ickshonpe.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}},"created_at":"2022-03-07T08:57:04.000Z","updated_at":"2022-03-07T09:02:44.000Z","dependencies_parsed_at":"2023-01-21T19:22:15.098Z","dependency_job_id":null,"html_url":"https://github.com/ickshonpe/commands_send_event","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ickshonpe/commands_send_event","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fcommands_send_event","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fcommands_send_event/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fcommands_send_event/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fcommands_send_event/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ickshonpe","download_url":"https://codeload.github.com/ickshonpe/commands_send_event/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ickshonpe%2Fcommands_send_event/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32377599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["bevy"],"created_at":"2024-10-10T17:05:02.602Z","updated_at":"2026-04-28T11:02:03.834Z","avatar_url":"https://github.com/ickshonpe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Commands Send Event\n\nAn extension trait for Commands that allows you to send events from a system without having to retrieve a typed EventWriter SystemParam.\n\n* version 0.9 supports Bevy 0.9\n* version 0.5 supports Bevy 0.8\n* version 0.3 \u0026 0.4 support Bevy 0.7\n* versions \u003c0.3 support Bevy 0.6\n\n## Limitations\n\n* Events won't be dispatched immediately, but at the next Stage boundary when the queued commands are applied to the World.\n\n#\n\n## Usage\nAdd to your project with the command\n```\ncargo add commands_send_event\n```\n\nor add directly add the dependency to your Cargo.toml\n```toml\n[dependencies.commands_send_event]\nversion = \"0.6\"\n```\n\nthen the ```send_event``` method is available on Commands:\n\n```rust\nuse commands_send_event::CommandsSendEvent;\n\n#[derive(Component)]\nstruct MyEventA(String);\n\n#[derive(Component)]\nstruct MyEventB(i32);\n\nfn sender(\n    mut commands: Commands\n) {\n    commands.send_event(MyEventA(\"Hello, World\"));\n    commands.send_event(MyEventB(42));\n}\n```\nThe `/examples` folder has two examples you can run with:\n```\ncargo run --example basic_usage\ncargo run --example schedule\n```\n\nAnyEventWriter is a facade over Commands that implements SystemParam. \n\n#\n## Note\n\nThis crate is a bit redundant now since Bevy 0.8 as sending events using ```World``` is very easy. With ```commands.add``` you can queue a closure to dispatch an event like so:\n```rust\ncommands.add(|world: \u0026mut World| \n    world.send_event(MyEvent)\n);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fcommands_send_event","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fickshonpe%2Fcommands_send_event","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fickshonpe%2Fcommands_send_event/lists"}