{"id":36495903,"url":"https://github.com/jurgen-kluft/cactor","last_synced_at":"2026-01-12T02:03:39.649Z","repository":{"id":57541334,"uuid":"111053526","full_name":"jurgen-kluft/cactor","owner":"jurgen-kluft","description":"Actor model library (Current state = Prototype)","archived":false,"fork":false,"pushed_at":"2025-10-16T13:47:50.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-17T16:52:00.196Z","etag":null,"topics":["actor-model","performance","simplicity","tiny"],"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/jurgen-kluft.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":"2017-11-17T03:34:55.000Z","updated_at":"2025-10-16T13:47:53.000Z","dependencies_parsed_at":"2024-01-17T02:47:08.811Z","dependency_job_id":"c15a2fe8-a754-4c1e-8237-9f28795ee6f2","html_url":"https://github.com/jurgen-kluft/cactor","commit_stats":{"total_commits":42,"total_committers":3,"mean_commits":14.0,"dds":"0.38095238095238093","last_synced_commit":"fa81e4b6f080b7ac54687c6b511b4eaf9f41bbe2"},"previous_names":["jurgen-kluft/xactor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jurgen-kluft/cactor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcactor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcactor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcactor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcactor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jurgen-kluft","download_url":"https://codeload.github.com/jurgen-kluft/cactor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jurgen-kluft%2Fcactor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331509,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"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-model","performance","simplicity","tiny"],"created_at":"2026-01-12T02:01:03.975Z","updated_at":"2026-01-12T02:03:39.635Z","avatar_url":"https://github.com/jurgen-kluft.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccore actor library (C++)\r\n\r\nA tiny actor library focussing mainly on performance which means that:\r\n\r\n* Constructing an actor-system you need to supply a number for the maximum number of actors\r\n* Need to provide beforehand the maximum number of messages that can be queued for actors\r\n* Actor can only send messages by pointer (no value copy, performance/simplicity)\r\n* Message will be send back to sender in `actor_t::returned(message_t*)` (re-use/performance/garbage-collection)\r\n* Actors receive messages in `actor_t::received(message_t*)`, actor has to switch:case on the message\r\n  type manually. (simplicity/performance)\r\n\r\n```c++\r\n    struct mydatamessage : public message_t\r\n    {\r\n        void    setup(actor_t* from, actor_t* to, msg_id_t id);\r\n        byte    m_data[64];\r\n    };\r\n```\r\n\r\n```c++\r\n    class actor : public handler_t\r\n    {\r\n        actor_t*                  m_actor;\r\n        system_t*                 m_system;\r\n        msg_id_t                  m_data_msg_id;\r\n        freelist_t\u003cmydatamessage\u003e m_data_msgs;\r\n\r\n    public:\r\n        void join(system_t* system)\r\n        {\r\n            m_system = system;\r\n            m_actor = actor_join(system, this);\r\n        }\r\n\r\n        virtual void received(message_t* msg)\r\n        {\r\n            // Inspect the message and react\r\n\r\n            // Send a message back to that actor\r\n            mydatamessage* msg_to_send = m_data_msgs.pop();\r\n\r\n            // Fill in data\r\n\r\n            // Send it to the recipient of the incoming message\r\n            actor_send(m_system, m_actor, msg_to_send, msg-\u003eget_recipient());\r\n        }\r\n\r\n        virtual void returned(message_t*\u0026 msg)\r\n        {\r\n            if (msg-\u003ehas_id(m_data_msg_id))\r\n            {\r\n                m_data_msgs.push(msg);\r\n            }\r\n\r\n            // Custom code\r\n        }\r\n    };\r\n```\r\n\r\n```c++\r\nsystem_t*    system = nactor::create_system(allocator, 8, 10, 1024, 32);\r\n\r\n// user needs to have classes implemented that derived from nactor::handler_t\r\n\r\nactor_t*     actor1 = actor_join(system, handler1);\r\nactor_t*     actor2 = actor_join(system, handler2);\r\n\r\n// if the user wants to send message from the main thread and other threads, then\r\n// on each thread he needs to reserve a 'producer' index.\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcactor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjurgen-kluft%2Fcactor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjurgen-kluft%2Fcactor/lists"}