{"id":47620351,"url":"https://github.com/gwigz/slua","last_synced_at":"2026-04-05T15:03:24.415Z","repository":{"id":345595050,"uuid":"1184689433","full_name":"gwigz/slua","owner":"gwigz","description":"Various NPM packages for SLua, including types and a basic TypeScriptToLua Plugin","archived":false,"fork":false,"pushed_at":"2026-03-31T18:59:27.000Z","size":850,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-02T05:56:19.607Z","etag":null,"topics":["converter","lua","lua-transpiler","luau","second-life","secondlife","slua","transpiler","ts-slua","tstl","tstl-plugin","typescript"],"latest_commit_sha":null,"homepage":"https://slua.gwigz.link","language":"TypeScript","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/gwigz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-17T20:48:03.000Z","updated_at":"2026-03-31T18:58:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/gwigz/slua","commit_stats":null,"previous_names":["gwigz/slua"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/gwigz/slua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwigz%2Fslua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwigz%2Fslua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwigz%2Fslua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwigz%2Fslua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gwigz","download_url":"https://codeload.github.com/gwigz/slua/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gwigz%2Fslua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31439444,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T13:13:19.330Z","status":"ssl_error","status_checked_at":"2026-04-05T13:13:17.778Z","response_time":75,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["converter","lua","lua-transpiler","luau","second-life","secondlife","slua","transpiler","ts-slua","tstl","tstl-plugin","typescript"],"created_at":"2026-04-01T22:00:32.799Z","updated_at":"2026-04-05T15:03:24.379Z","avatar_url":"https://github.com/gwigz.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\".github/assets/logo.svg\" width=\"128\" height=\"128\" alt=\"Logo\" /\u003e\n\u003c/p\u003e\n\n# `@gwigz/slua-*`\n\nLSL type definitions and a [TypeScript-to-Lua](https://typescripttolua.github.io) plugin for Second Life. Full editor support, compile-time safety, minimal runtime overhead.\n\nIf TypeScript is where you're productive, you don't need to learn a new language to script for Second Life. SLua has decent tooling, but this lets you stay in the ecosystem you already know.\n\n## Packages\n\n| Package                                               | Description                                                   |\n| ----------------------------------------------------- | ------------------------------------------------------------- |\n| [`@gwigz/slua-types`](packages/types)                 | Auto-generated TypeScript declarations for all SLua/LSL APIs  |\n| [`@gwigz/slua-tstl-plugin`](packages/tstl-plugin)     | TSTL plugin enforcing SLua constraints                        |\n| [`@gwigz/slua-modules`](packages/modules)             | Shared runtime modules (config helpers, testing utilities)    |\n| [`@gwigz/slua-oxlint-config`](packages/oxlint-config) | Shared oxlint config catching SLua-incompatible patterns      |\n| [`@gwigz/slua-create`](packages/create)               | CLI scaffolding tool for new SLua projects                    |\n| [`@gwigz/slua-json`](packages/json)                   | Tagged JSON codec for exchanging typed data with SLua scripts |\n\n## Examples\n\nI use this toolchain for my own projects, it's how I find the rough edges:\n\n| Project                                                             | Description                                                                     |\n| ------------------------------------------------------------------- | ------------------------------------------------------------------------------- |\n| [`examples/sim-wide-relay`](examples/sim-wide-relay)                | Region-wide chat relay, deployed at my favorite sim                             |\n| [`slua-derez-patcher`](https://github.com/gwigz/slua-derez-patcher) | Skips the rez-edit-take-replace cycle; patches rezzables using `ll.DerezObject` |\n\n### Related Projects\n\nThese packages also pair well with the TSTL pipeline, and LSL HTTP-in features:\n\n| Project                                                               | Description                                                                 |\n| --------------------------------------------------------------------- | --------------------------------------------------------------------------- |\n| [`tstl-bundle-flatten`](https://github.com/gwigz/tstl-bundle-flatten) | TSTL plugin that flattens `luaBundle` output, eliminating the module system |\n| [`jsx-inline`](https://github.com/gwigz/jsx-inline)                   | Compiles JSX templates into optimized inline string literals                |\n| [`slick-css`](https://github.com/gwigz/slick-css)                     | A shadcn-style classless CSS semantic component library                     |\n\n## Quick Start\n\nScaffold a new project with the CLI:\n\n```bash\nbunx @gwigz/slua-create\n```\n\nThis walks you through template selection, optional extras (JSX, config module, StyLua, linting), and generates a ready-to-build project.\n\n### Manual Setup\n\nInstall the packages:\n\n```bash\nnpm install --save-dev typescript typescript-to-lua @gwigz/slua-types @gwigz/slua-tstl-plugin\n```\n\nCreate a `tsconfig.json` in your project:\n\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ESNext\",\n    \"module\": \"ESNext\",\n    \"strict\": true,\n    \"moduleDetection\": \"force\",\n    \"types\": [\"@typescript-to-lua/language-extensions\", \"@gwigz/slua-types\"]\n  },\n  \"tstl\": {\n    \"luaTarget\": \"Luau\",\n    \"luaLibImport\": \"inline\",\n    \"luaPlugins\": [{ \"name\": \"@gwigz/slua-tstl-plugin\" }],\n    \"extension\": \"slua\"\n  }\n}\n```\n\nSee [TypeScriptToLua configuration](https://typescripttolua.github.io/docs/configuration) for more config options.\n\n### Editor \u0026 GitHub setup (optional)\n\nMap `.slua` to Lua highlighting in VS Code (and forks):\n\n```json\n// .vscode/settings.json\n{\n  \"files.associations\": {\n    \"*.slua\": \"lua\"\n  }\n}\n```\n\nTell GitHub to highlight `.slua` files as Lua:\n\n```ini\n# .gitattributes\n*.slua linguist-language=Lua\n```\n\n### Write TypeScript, compile to SLua\n\n```typescript\nconst owner = ll.GetOwner()\n\nLLEvents.on(\"touch_start\", (events) =\u003e {\n  for (const event of events) {\n    const key = event.getKey()\n\n    if (key === owner) {\n      ll.Say(0, `Hello secondlife:///app/agent/${key}/about!`)\n\n      return\n    }\n  }\n})\n```\n\nCompile with `npx tstl` (or `bunx tstl`, `pnpm tstl`, etc.) to get:\n\n```lua\nlocal owner = ll.GetOwner()\n\nLLEvents:on(\"touch_start\", function(events)\n    for ____, event in ipairs(events) do\n        local key = event:getKey()\n\n        if key == owner then\n            ll.Say(0, (\"Hello secondlife:///app/agent/\" .. tostring(key)) .. \"/about!\")\n\n            return\n        end\n    end\nend)\n```\n\n### Plugin Transforms\n\nThe TSTL plugin automatically translates TypeScript patterns to native Luau/LSL equivalents for JSON, base64, string methods, array methods, bitwise operators, and floor division. See the [full transform reference](packages/tstl-plugin#transforms) for details.\n\n### Comments\n\nDue to a [TSTL limitation](https://github.com/TypeScriptToLua/TypeScriptToLua/issues/815), only valid JSDoc-style comments (`/** */`) are preserved in the output. Regular comments (`//`, `/* */`) are stripped:\n\n```typescript\n/** This comment will appear in the Lua output */\nconst owner = ll.GetOwner()\n\n// This comment will be stripped\nconst pos = new Vector(128, 128, 20)\n```\n\n```lua\n--- This comment will appear in the Lua output\nlocal owner = ll.GetOwner()\nlocal pos = vector.create(128, 128, 20)\n```\n\n# Resources\n\n| Resource                                                           | Description                                     |\n| ------------------------------------------------------------------ | ----------------------------------------------- |\n| [Creator Portal](https://create.secondlife.com)                    | Second Life creator tools and documentation     |\n| [VSCode Extension](https://github.com/secondlife/sl-vscode-plugin) | SLua language support for VS Code by Linden Lab |\n| [LSL Definitions](https://github.com/secondlife/lsl-definitions)   | LSL and SLua API definitions by Linden Lab      |\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwigz%2Fslua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgwigz%2Fslua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgwigz%2Fslua/lists"}