{"id":13896455,"url":"https://github.com/javalikescript/luajls","last_synced_at":"2025-07-17T12:33:43.234Z","repository":{"id":38972586,"uuid":"176789961","full_name":"javalikescript/luajls","owner":"javalikescript","description":"luajls is a set of Lua modules for developing stand-alone Lua applications","archived":false,"fork":false,"pushed_at":"2024-10-28T18:05:54.000Z","size":1724,"stargazers_count":51,"open_issues_count":1,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-10-28T19:24:08.618Z","etag":null,"topics":["linux","lua","lua-modules","standard-library","windows"],"latest_commit_sha":null,"homepage":"","language":"Lua","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/javalikescript.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T18:02:12.000Z","updated_at":"2024-10-28T18:05:58.000Z","dependencies_parsed_at":"2023-10-28T08:24:42.103Z","dependency_job_id":"0c7efbc7-ecf8-4149-a873-f7e6dd7a851e","html_url":"https://github.com/javalikescript/luajls","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javalikescript%2Fluajls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javalikescript%2Fluajls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javalikescript%2Fluajls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/javalikescript%2Fluajls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/javalikescript","download_url":"https://codeload.github.com/javalikescript/luajls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226265521,"owners_count":17597222,"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":["linux","lua","lua-modules","standard-library","windows"],"created_at":"2024-08-06T18:02:56.225Z","updated_at":"2024-11-25T02:30:37.783Z","avatar_url":"https://github.com/javalikescript.png","language":"Lua","readme":"\u003cdiv align=\"center\"\u003e\n\n•\n[Manual](https://github.com/javalikescript/luajls/blob/master/doc_topics/manual.md \"User manual\")\n•\n[Docs](https://javalikescript.github.io/luajls/ \"API documentation\")\n•\n[Downloads](https://github.com/javalikescript/luajls/releases/latest \"Release binaries\")\n•\n\n\u003c/div\u003e\n\n\n## What is luajls?\n\nluajls is a set of Lua modules for developing stand-alone [Lua](https://www.lua.org/) applications.\n\nThe modules provide general-purpose functions such as class definition and promise, to operating system abstractions such as file system and network access.\nThe modules support asynchronous I/O based on an event loop.\n\n\u003cimg src=\"./luajls.svg\" alt=\"luajls stands on the shoulders of giants\"\u003e\n\nThe main targeted operating systems are Linux and Windows.\n\n## What are the features?\n\nluajls provides:\n* language basics such as class definition, serialization, logging, exception, promise, event loop, buffer, lock, threads, processes\n* file system manipulation, I/O, file and networking access, serial communication, pipe, streams\n* TCP, UDP, HTTP, HTTP/2, WebSocket, MQTT client and server with support for secured communication using SSL\n* utility modules for queue, list and map, date and time, JSON and XML formats, codec, message digest, deflate  \nadvanced utility modules for ZIP and tar files, GPIO, AST, scheduling, worker and web view\n\n## What does it look like?\n\nThe following is the hello world HTTP server script.\n\n```lua\nlocal event = require('jls.lang.event')\nlocal HttpServer = require('jls.net.http.HttpServer')\n\nlocal httpServer = HttpServer:new()\nhttpServer:bind('::', 8000)\nhttpServer:createContext('/', function(exchange)\n  local response = exchange:getResponse()\n  response:setBody([[\u003c!DOCTYPE html\u003e\n  \u003chtml\u003e\n    \u003cbody\u003e\n      \u003cp\u003eIt works !\u003c/p\u003e\n    \u003c/body\u003e\n  \u003c/html\u003e\n  ]])\nend)\n\nevent:loop()\n```\n\nluajls supports the async/await pattern.\n\n```lua\nlocal event = require('jls.lang.event')\nlocal Promise = require('jls.lang.Promise')\nlocal HttpClient = require('jls.net.http.HttpClient')\n\nlocal function nodePattern(name)\n  local namePattern = string.gsub(name, '%a', function(a) return '['..string.lower(a)..string.upper(a)..']' end)\n  return '\u003c%s*'..namePattern..'%s*\u003e%s*([^\u003c]*)%s*\u003c%s*/%s*'..namePattern..'%s*\u003e'\nend\n\nPromise.async(function(await)\n  local client = HttpClient:new('http://www.lua.org')\n  local response = await(client:fetch('/'))\n  local body = await(response:text())\n  client:close()\n  print(string.match(body, nodePattern('title')))\nend)\n\nevent:loop()\n```\n\n\n## How to install and use it?\n\nJust drop the *jls* folder in your Lua path.\n\nThe only required dependency is Lua.\nOptional dependencies are C-based or plain Lua modules such as *luafilesystem*, *luasocket*, *luv*, *lua-openssl*, *lua-cjson*.\nBy example, the file system manipulation requires one of the *luafilesystem* or the *luv* dependent module.\nThe recommended dependency is *luv* as it will provide you a uniform support of the *io*, *lang* and *net* packages.\n\nExecutable files:\n* The [release](https://github.com/javalikescript/luajls/releases/latest) assets contain archives with all the required libraries.  \nThe default, *shared*, archive contains the Lua interpreter, the C modules as shared libraries and the Lua modules.\nThe *static* archive contains a single executable with all the required dependencies.  \n* luajls is available on winget  \n`winget install luajls`\n* luajls is also available on [LuaRocks](https://luarocks.org/modules/javalikescript/luajls).\n\nAs luajls is composed of Lua modules, you need to adapt the environment variables *LUA_PATH* and *LUA_CPATH* to include the luajls home directory.\n\nLua, luajls and all the dependencies are available in the [Lua C libraries repository](https://github.com/javalikescript/luaclibs).\n\n\n## What are the supported Lua versions?\n\nThe only fully supported version is the latest, currently Lua 5.4.\n\nIn order to support the majority of Lua engines, an effort is made to provide a good level of compatibility for Lua 5.1 and LuaJIT.\nLua 5.1 compatibility is achived by using a transcompiler and is available in the respective 5.1 releases, the default code base is not fully compatible with Lua 5.1.\n\n\n## What do you want to do?\n\nBrowse the [examples](https://github.com/javalikescript/luajls/tree/master/examples)\nor applications such as [Fast Cut](https://github.com/javalikescript/fcut) and [Light Home Automation](https://github.com/javalikescript/lha).\n\nRead the [user manual](https://github.com/javalikescript/luajls/blob/master/doc_topics/manual.md) or the [API documentation](https://javalikescript.github.io/luajls/).\n\nDownload [binaries](https://github.com/javalikescript/luajls/releases/latest \"Windows 64bits, Linux 64bits, WD MyCloud (Gen1, Sequoia), Raspberry Pi (3 Model B+)\") or access the [source code](https://github.com/javalikescript/luajls).\n","funding_links":[],"categories":["Lua"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavalikescript%2Fluajls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjavalikescript%2Fluajls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjavalikescript%2Fluajls/lists"}