{"id":15289279,"url":"https://github.com/poga/actix-lua","last_synced_at":"2025-10-07T03:31:01.880Z","repository":{"id":57479034,"uuid":"142282011","full_name":"poga/actix-lua","owner":"poga","description":"Safe Lua Scripting Environment for Actix","archived":true,"fork":false,"pushed_at":"2020-08-01T07:02:10.000Z","size":106,"stargazers_count":123,"open_issues_count":5,"forks_count":13,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-10-06T01:39:21.251Z","etag":null,"topics":["actix","actor-model","lua","rust"],"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/poga.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":"2018-07-25T10:01:19.000Z","updated_at":"2025-03-31T15:00:39.000Z","dependencies_parsed_at":"2022-09-18T05:36:29.360Z","dependency_job_id":null,"html_url":"https://github.com/poga/actix-lua","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/poga/actix-lua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poga%2Factix-lua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poga%2Factix-lua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poga%2Factix-lua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poga%2Factix-lua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poga","download_url":"https://codeload.github.com/poga/actix-lua/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poga%2Factix-lua/sbom","scorecard":{"id":739701,"data":{"date":"2025-08-11","repo":{"name":"github.com/poga/actix-lua","commit":"69993538d4289e8bbf793e5e812627fa113edfe3"},"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":"Code-Review","score":0,"reason":"Found 2/27 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":"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":"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":"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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T17:05:39.238Z","repository_id":57479034,"created_at":"2025-08-22T17:05:39.238Z","updated_at":"2025-08-22T17:05:39.238Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278715528,"owners_count":26033301,"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-10-07T02:00:06.786Z","response_time":59,"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":["actix","actor-model","lua","rust"],"created_at":"2024-09-30T16:00:12.070Z","updated_at":"2025-10-07T03:31:01.581Z","avatar_url":"https://github.com/poga.png","language":"Rust","readme":"# actix-lua\n\n[![Build Status](https://travis-ci.org/poga/actix-lua.svg?branch=master)](https://travis-ci.org/poga/actix-lua)\n[![Latest Version](https://img.shields.io/crates/v/actix-lua.svg)](https://crates.io/crates/actix-lua)\n[![API Documentation](https://docs.rs/actix-lua/badge.svg)](https://docs.rs/actix-lua)\n\nA safe scripting environment for [actix](https://github.com/actix/actix) with the [Lua Programming Language](https://www.lua.org):\n\n* Each `LuaActor` is an isolated Lua VM.\n* Communicate between actors with predefined message types: `String`, `Integer`, `Number`, `Boolean`, `Nil`, and `Table`.\n* Asynchronous `send` between actors with Lua coroutine.\n\nFor more info about the \"safety\", check [rlua's README](https://github.com/kyren/rlua).\n\n## Synopsis\n\nA basic Lua actor\n\n```rust\nextern crate actix_lua;\nuse actix_lua::{LuaActorBuilder, LuaMessage};\n\nfn main () {\n    let addr = LuaActorBuilder::new()\n        .on_handle_with_lua(r#\"return ctx.msg + 42\"#)\n        .build()\n        .unwrap()\n        .start();\n\n    let res = addr.send(LuaMessage:from(100));\n    // return: 142\n}\n```\n\nYou can send messages to other actor asynchronously with `ctx.send`\n\n```rust\nstruct Callback;\nimpl Actor for Callback {\n    type Context = Context\u003cSelf\u003e;\n}\n\nimpl Handler\u003cLuaMessage\u003e for Callback {\n    type Result = LuaMessage;\n\n    fn handle(\u0026mut self, msg: LuaMessage, _ctx: \u0026mut Context\u003cSelf\u003e) -\u003e Self::Result {\n        LuaMessage::String(\"hello\".to_string())\n    }\n}\n\nlet mut actor = LuaActorBuilder::new()\n    // create a new LuaActor from a lua script when the actor is started.\n    // send message to the newly created actor with `ctx.send`, block and wait for its response.\n    .on_started_with_lua(\n        r#\"\n    local result = ctx.send(\"callback, \"Hello\")\n    print(result) -- print \"hello\"\n    \"#).build()\n    .unwrap();\n\nactor.add_recipients(\"callback\", Callback.start().recipient());\n\nactor.start();\n```\n\n## Install\n\nAdd `actix-lua` to your `Cargo.toml`:\n\n```toml\n[dependencies]\nactix-lua = \"0.7\"\n```\n\n## Example\n\nCheck [examples](https://github.com/poga/actix-lua/tree/master/examples) directory.\n\nThere's also a write-up about analyzing streaming data with actix-lua. [link](https://devpoga.org/post/parsing-streaming-data-actix-lua/)\n\n## Lua Actor\n\nUse [`LuaActor`](https://docs.rs/actix-lua/latest/actix_lua/struct.LuaActor.html) to integrate Lua scripts to your system with actor model.\n\n### Message\n\nIn actor model, actors communicate with messages. `LuaMessage` is the only message type accepted by `LuaActor`:\n\n* `LuaMessage` can be converted to/from primitive types with `LuaMessage::from()`.\n* Lua types(e.g. number, table) will be convert to `LuaMessage` automatically.\n\n### Lua API\n\n**Note**: Avoid declaring global variables in your Lua script. It might conflict with future `actix-lua` update and break your program.\n\n#### `ctx.msg`\n\nThe message sent to Lua actor.\n\n#### `ctx.notify(msg)`\n\nSend message `msg` to self.\n\n#### `ctx.notify_later(msg, seconds)`\n\nSend message `msg` to self after specified period of time.\n\n#### `local result = ctx.send(recipient, msg)`\n\nSend message `msg` to `recipient asynchronously and wait for response.\n\nEquivalent to `actix::Recipient.send`.\n\n#### `ctx.do_send(recipient, msg)`\n\nSend message `msg` to `recipient`.\n\nEquivalent to `actix::Recipient.do_send`.\n\n#### `ctx.terminate()`\n\nTerminate actor execution.\n\n## License\n\nThe MIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoga%2Factix-lua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoga%2Factix-lua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoga%2Factix-lua/lists"}