{"id":18266412,"url":"https://github.com/agersant/squeak","last_synced_at":"2025-06-11T16:35:41.325Z","repository":{"id":64182930,"uuid":"573947368","full_name":"agersant/squeak","owner":"agersant","description":"Rust library to facilitate event-driven programming.","archived":false,"fork":false,"pushed_at":"2023-12-26T20:57:17.000Z","size":32,"stargazers_count":77,"open_issues_count":0,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-04T01:17:20.660Z","etag":null,"topics":["rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agersant.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2022-12-03T23:36:29.000Z","updated_at":"2025-03-24T17:10:03.000Z","dependencies_parsed_at":"2025-04-04T21:44:41.297Z","dependency_job_id":null,"html_url":"https://github.com/agersant/squeak","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/agersant/squeak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agersant%2Fsqueak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agersant%2Fsqueak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agersant%2Fsqueak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agersant%2Fsqueak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agersant","download_url":"https://codeload.github.com/agersant/squeak/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agersant%2Fsqueak/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259298858,"owners_count":22836455,"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":["rust"],"created_at":"2024-11-05T11:23:15.530Z","updated_at":"2025-06-11T16:35:41.276Z","avatar_url":"https://github.com/agersant.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Squeak\n\n[![build_badge]][build_link] [![crates.io_badge]][crates.io_link] [![docs_badge]][docs_link]\n\n[build_badge]: https://img.shields.io/github/actions/workflow/status/agersant/squeak/CI.yml?branch=master\n[build_link]: https://github.com/agersant/squeak/actions/workflows/CI.yml?query=branch%3A+branch%3Amaster++\n[crates.io_badge]: https://img.shields.io/badge/crates.io-squeak-green\n[crates.io_link]: https://crates.io/crates/squeak\n[docs_badge]: https://img.shields.io/badge/docs.rs-squeak-blue\n[docs_link]: https://docs.rs/squeak/latest/squeak/\n\nSqueak is a zero-dependency Rust library to facilitate event-driven programming.\n\n# Examples\n\n```rust\nuse squeak::{Delegate, Response};\n\nlet on_damage_received = Delegate::new();\non_damage_received.subscribe(|amount| {\n    println!(\"Received {amount} damage\");\n    Response::StaySubscribed\n});\n\non_damage_received.broadcast(16); // Prints \"Received 16 damage\"\non_damage_received.broadcast(14); // Prints \"Received 14 damage\"\non_damage_received.broadcast(28); // Prints \"Received 28 damage\"\n```\n\n```rust\nuse squeak::{Observable, Response};\n\nlet mut health = Observable::new(100);\nhealth.subscribe(|updated_health| {\n    println!(\"Health is now {updated_health}\");\n    Response::StaySubscribed\n});\n\nhealth.mutate(|h| *h -= 10); // Prints \"Health is now 90\"\nhealth.mutate(|h| *h -= 5);  // Prints \"Health is now 85\"\nhealth.mutate(|h| *h += 25); // Prints \"Health is now 110\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagersant%2Fsqueak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagersant%2Fsqueak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagersant%2Fsqueak/lists"}