{"id":17128606,"url":"https://github.com/xudong-huang/may_actor","last_synced_at":"2025-08-18T07:31:31.632Z","repository":{"id":57637184,"uuid":"115604435","full_name":"Xudong-Huang/may_actor","owner":"Xudong-Huang","description":"Local Actor library based on may","archived":false,"fork":false,"pushed_at":"2024-06-19T14:16:18.000Z","size":31,"stargazers_count":28,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-08-07T01:22:34.004Z","etag":null,"topics":["actor","coroutine","rust"],"latest_commit_sha":null,"homepage":null,"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/Xudong-Huang.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2017-12-28T08:54:02.000Z","updated_at":"2024-07-25T05:23:22.000Z","dependencies_parsed_at":"2024-06-20T00:32:02.422Z","dependency_job_id":"1b4fda05-99cf-40d2-8cb4-d9b81b9ccc86","html_url":"https://github.com/Xudong-Huang/may_actor","commit_stats":{"total_commits":40,"total_committers":1,"mean_commits":40.0,"dds":0.0,"last_synced_commit":"82eac807d0e8081892dad136fa3bfd3f9e374930"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Xudong-Huang/may_actor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xudong-Huang%2Fmay_actor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xudong-Huang%2Fmay_actor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xudong-Huang%2Fmay_actor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xudong-Huang%2Fmay_actor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xudong-Huang","download_url":"https://codeload.github.com/Xudong-Huang/may_actor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xudong-Huang%2Fmay_actor/sbom","scorecard":{"id":153764,"data":{"date":"2025-08-11","repo":{"name":"github.com/Xudong-Huang/may_actor","commit":"096d3ee218d369b5bb8c3d1120a7a6e730f3bf32"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-16T11:16:07.998Z","repository_id":57637184,"created_at":"2025-08-16T11:16:07.998Z","updated_at":"2025-08-16T11:16:07.998Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270961533,"owners_count":24675914,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["actor","coroutine","rust"],"created_at":"2024-10-14T19:07:31.798Z","updated_at":"2025-08-18T07:31:31.339Z","avatar_url":"https://github.com/Xudong-Huang.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/Xudong-Huang/may_actor.svg?branch=master)](https://travis-ci.org/Xudong-Huang/may_actor)\n[![Build status](https://ci.appveyor.com/api/projects/status/5c0tbe3yaijpxxi3/branch/master?svg=true)](https://ci.appveyor.com/project/Xudong-Huang/may-actor/branch/master)\n[![Current Crates.io Version](https://img.shields.io/crates/v/may_actor.svg)](https://crates.io/crates/may_actor)\n[![Document](https://img.shields.io/badge/doc-may_actor-green.svg)](https://docs.rs/may_actor)\n\n\n# may_actor\n\nrust native actor library based on [may][may]\n\nwith this library\n* you don’t need to declare messages that passed into the actor\n* you don’t have to implement “actor” interface or trait for your actor.\n* the actors will automatically have M:N scheduling powered by [may][may]\n\n## Usage\n```rust\nextern crate may_actor;\nuse may_actor::Actor;\n\nfn main() {\n    struct HelloActor(u32);\n    let a = Actor::new(HelloActor(0));\n\n    a.call(|me| {\n        me.0 = 10;\n        println!(\"hello world\");\n    });\n    // the with would wait previous messages process done\n    a.with(|me| println!(\"actor value is {}\", me.0));\n}\n```\n\nfor a detailed example, please see [pi.rs](examples/pi.rs)\n\n## Features\n\n- send message via closure (`Actor.call`)\n\nYou can send messages to the actor with the `call` API. It accepts a closure that has the `\u0026mut T` as parameter, so that you can change it’s internal state. The closure would be send to a queue inside the actor, and the actor would execute the closure asynchronously by a coroutine that associate with it . This API would not block user’s execution and would return immediately. if panic happens in the closure, it will be caught and ignored in actor's coroutine context.\n\n- synchronously run a closure within actor coroutine context (`Actor.with`)\n\nYou can also synchronously manipulate the actor's internal state by the `with` API. It accepts a closure that has the `\u0026mut T` as parameter, so that you can view or modify actor's internal state. The closure would be executed by the associated coroutine if there are no other pending messages. And it will block until the closure returns the result to caller. If any panic happens in the closure, it will propagate to the caller's context\n\n- convert from raw instance reference to Actor (`Actor.from`)\n\nYou can transmute a \u0026self type unsafely to it's handle type `Actor\u003cT\u003e`. This is convenient when need to get an actor handle in the implementation that need to pass as a function parameter.\n\nHowever transmute from non actor context would trigger undefined behavior.\n\n- Allow panic inside a closure message, and this would not kill the actor, the actor will continue to process successive messages.\n\n- The actor can be cloned to get a new handle, this is just like how `Arc\u003cT\u003e` works, if all the actor handle got dropped, the associated coroutine will automatically exit.\n\n## Notice\n* Actor will catch panic and ignore the panic if any happened when processing a message, so there is no supervisor and restart policy right now. The actor only exit if all handles are dropped by user.\n* Don't call thread block APIs in passed in closures, call [May][may] version APIs instead.\n* This simple library doesn't support spawn actors across processes\n\n## License\n\n`may_actor` is licensed under either of the following, at your option:\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT License ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\n\u003c!--refs--\u003e\n[may]:https://github.com/Xudong-Huang/may","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxudong-huang%2Fmay_actor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxudong-huang%2Fmay_actor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxudong-huang%2Fmay_actor/lists"}