{"id":21807600,"url":"https://github.com/zhaojh329/lua-eco","last_synced_at":"2025-07-16T11:41:38.151Z","repository":{"id":40491382,"uuid":"478127414","full_name":"zhaojh329/lua-eco","owner":"zhaojh329","description":"🐛Lua-eco is a Lua interpreter with a built-in event loop for scheduling lightweight coroutines automatically, enabling efficient concurrency in Lua. Build high-performance, scalable applications.","archived":false,"fork":false,"pushed_at":"2025-06-20T06:12:17.000Z","size":775,"stargazers_count":85,"open_issues_count":3,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T17:03:49.279Z","etag":null,"topics":["coroutine","dns","http","https","libev","lua","mqtt","socket","ssl","ubus","websocket"],"latest_commit_sha":null,"homepage":"","language":"C","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/zhaojh329.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":["https://raw.githubusercontent.com/zhaojh329/zhaojh329/refs/heads/main/微信支付.png","https://raw.githubusercontent.com/zhaojh329/zhaojh329/refs/heads/main/支付宝.jpg","https://paypal.me/zjh329?country.x=C2\u0026locale.x=zh_XC"]}},"created_at":"2022-04-05T12:52:44.000Z","updated_at":"2025-06-20T06:12:20.000Z","dependencies_parsed_at":"2023-12-21T13:16:02.599Z","dependency_job_id":"dfe60e03-dbc1-40a1-a35c-b4e1ef3c6c6c","html_url":"https://github.com/zhaojh329/lua-eco","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/zhaojh329/lua-eco","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Flua-eco","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Flua-eco/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Flua-eco/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Flua-eco/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaojh329","download_url":"https://codeload.github.com/zhaojh329/lua-eco/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaojh329%2Flua-eco/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265506553,"owners_count":23778767,"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":["coroutine","dns","http","https","libev","lua","mqtt","socket","ssl","ubus","websocket"],"created_at":"2024-11-27T12:46:34.491Z","updated_at":"2025-07-16T11:41:38.142Z","avatar_url":"https://github.com/zhaojh329.png","language":"C","funding_links":["https://raw.githubusercontent.com/zhaojh329/zhaojh329/refs/heads/main/微信支付.png","https://raw.githubusercontent.com/zhaojh329/zhaojh329/refs/heads/main/支付宝.jpg","https://paypal.me/zjh329?country.x=C2\u0026locale.x=zh_XC"],"categories":[],"sub_categories":[],"readme":"# lua-eco([中文](/README_ZH.md))\n\n[1]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=plastic\n[2]: /LICENSE\n[3]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=plastic\n[4]: https://github.com/zhaojh329/lua-eco/pulls\n[5]: https://img.shields.io/badge/Issues-welcome-brightgreen.svg?style=plastic\n[6]: https://github.com/zhaojh329/lua-eco/issues/new\n[7]: https://img.shields.io/badge/release-3.10.0-blue.svg?style=plastic\n[8]: https://github.com/zhaojh329/lua-eco/releases\n[9]: https://github.com/zhaojh329/lua-eco/workflows/build/badge.svg\n\n[![license][1]][2]\n[![PRs Welcome][3]][4]\n[![Issue Welcome][5]][6]\n[![Release Version][7]][8]\n![Build Status][9]\n![visitors](https://visitor-badge.laobi.icu/badge?page_id=zhaojh329.lua-eco)\n\n[lua]: https://www.lua.org\n[libev]: http://software.schmorp.de/pkg/libev.html\n[ubus]: https://openwrt.org/docs/techref/ubus\n\nLua-eco is a Lua interpreter with a built-in event loop for scheduling lightweight coroutines automatically, enabling efficient concurrency in Lua. Build high-performance, scalable applications.\n\nLua-eco also provides some modules for you to build applications quickly:\n\n* `log`: Provides logging functionality for Lua-eco applications, allowing you to log messages at different severity levels and output them to various destinations.\n* `time`: Provides a Lua interface, allowing you to get current time, sleeping, performing timer operations.\n* `file`: Provides a Lua interface, allowing you to read and write files, traverse directory and perform other file-related operations.\n* `sys`: Provides access to various system-level functionality, such as process id, system information, and allows you to execute shell commands while obtaining their exit status as well as their standard output and standard error output.\n* `socket`: Provides a low-level network socket interface for Lua-eco applications, allowing you to create and manage network connections. Includes tcp, tcp6, udp, udp6 and unix.\n* `ssl`: Provides SSL/TLS support for Lua-eco applications, allowing you to establish secure connections to remote servers.\n* `http/https`: Provides a HTTP client and server implementation for Lua-eco applications.\n* `websocket`: Provides a WebSocket client and server implementation for Lua-eco applications, allowing you to build real-time web applications.\n* `mqtt`: Provides an implementation of the MQTT 3.1.1 protocol for Lua-eco applications.\n* `dns`: Provides a DNS client implementation for Lua-eco applications, allowing you to perform DNS lookups and resolve domain names.\n* `ubus`: Provides a Lua interface to the [ubus] system in OpenWrt, allowing you to interact with system services and daemons.\n* `sync`: Provides operations for synchronization between coroutines.\n* `channel`: Provides a mechanism for communication between coroutines by sending and receiving values.\n* `netlink`: Provides operations for inter-process communication (IPC) between both the kernel and userspace processes.\n* `nl80211`: Show/manipulate wireless devices and their configuration.\n* `termios`: Bind unix API for terminal/serial I/O.\n* `ssh`: Bind libssh2.\n* `packet`: For low-level packet construction and parsing.\n\nWould you like to try it? Kinda interesting.\n\n```lua\n#!/usr/bin/env eco\n\nlocal time = require 'eco.time'\n\neco.run(function(name)\n    while true do\n        print(time.now(), name, coroutine.running())\n        time.sleep(1.0)\n    end\nend, 'eco1')\n\neco.run(function(name)\n    while true do\n        print(time.now(), name, coroutine.running())\n        time.sleep(2.0)\n    end\nend, 'eco2')\n```\n\n## Requirements\n* [libev] - A full-featured and high-performance event loop\n\n## Build\n\n### Ubuntu\n\n    sudo apt install -y liblua5.4-dev libev-dev libssl-dev\n    git clone --recursive https://github.com/zhaojh329/lua-eco.git\n    cd lua-eco \u0026\u0026 mkdir build \u0026\u0026 cd build\n    cmake .. \u0026\u0026 sudo make install\n\n### OpenWrt\n\n    Languages  ---\u003e\n        Lua  ---\u003e\n            -*- lua-eco............... A Lua interpreter with a built-in libev event loop\n            -*- lua-eco-base64................................ base64 support for lua-eco\n             -*- lua-eco-dns...................................... dns support for lua-eco\n             -*- lua-eco-file.............................. file utils support for lua-eco\n             -*- lua-eco-http.............................. http/https support for lua-eco\n             -*- lua-eco-log................................ log utils support for lua-eco\n             \u003c*\u003e lua-eco-mqtt.................................... mqtt support for lua-eco\n             \u003c*\u003e lua-eco-network.............................. network support for lua-eco\n             -*- lua-eco-sha1.................................... sha1 support for lua-eco\n             -*- lua-eco-socket................................ socket support for lua-eco\n             -*- lua-eco-ssl...................................... ssl support for lua-eco\n                SSL Library (mbedTLS)  ---\u003e\n            -*- lua-eco-sys.............................. system utils support for lua-eco\n            \u003c*\u003e lua-eco-termios............................... termios support for lua-eco\n            -*- lua-eco-ubus..................................... ubus support for lua-eco\n            \u003c*\u003e lua-eco-websocket........................... websocket support for lua-eco\n            \u003c*\u003e lua-eco-netlink............................... netlink support for lua-eco\n            \u003c*\u003e lua-eco-nl80211............................... nl80211 support for lua-eco\n            \u003c*\u003e lua-eco-packet................................. packet support for lua-eco\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Flua-eco","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaojh329%2Flua-eco","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaojh329%2Flua-eco/lists"}