{"id":24096449,"url":"https://github.com/ippclub/yuescript","last_synced_at":"2026-02-24T12:01:00.954Z","repository":{"id":40370668,"uuid":"96284278","full_name":"IppClub/YueScript","owner":"IppClub","description":"A MoonScript dialect compiles to Lua.","archived":false,"fork":false,"pushed_at":"2026-02-18T04:47:33.000Z","size":3901,"stargazers_count":562,"open_issues_count":61,"forks_count":44,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-02-18T09:41:20.061Z","etag":null,"topics":["cpp","lua","moonscript","transpiler","yuescript"],"latest_commit_sha":null,"homepage":"http://yuescript.org","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/IppClub.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-07-05T06:25:42.000Z","updated_at":"2026-02-16T11:14:53.000Z","dependencies_parsed_at":"2025-12-24T18:07:20.782Z","dependency_job_id":null,"html_url":"https://github.com/IppClub/YueScript","commit_stats":{"total_commits":663,"total_committers":16,"mean_commits":41.4375,"dds":0.03167420814479638,"last_synced_commit":"f38c4f94c9ba0499d923e59483d6381b97cce926"},"previous_names":["ippclub/yuescript","pigpigyyy/yuescript"],"tags_count":107,"template":false,"template_full_name":null,"purl":"pkg:github/IppClub/YueScript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IppClub%2FYueScript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IppClub%2FYueScript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IppClub%2FYueScript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IppClub%2FYueScript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IppClub","download_url":"https://codeload.github.com/IppClub/YueScript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IppClub%2FYueScript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29781202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cpp","lua","moonscript","transpiler","yuescript"],"created_at":"2025-01-10T12:36:48.611Z","updated_at":"2026-02-24T12:01:00.941Z","avatar_url":"https://github.com/IppClub.png","language":"Lua","readme":"# YueScript\n\n\u003ctable align=\"center\"\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" valign=\"middle\" width=\"150\" height=\"150\"\u003e\n      \u003cimg src=\"doc/docs/.vitepress/public/image/yuescript.png\" alt=\"YueScript logo\"/\u003e\u003cbr/\u003e\n    \u003c/td\u003e\n    \u003ctd valign=\"middle\"\u003e\n      \u003cstrong\u003eA Language Compiles to Lua\u003c/strong\u003e\u003cbr/\u003e\n      \u003csub\u003eDynamic, expressive, and concise syntax for Lua development.\u003c/sub\u003e\u003cbr/\u003e\n      \u003csub\u003e\n        \u003ca href=\"https://yuescript.org/doc\"\u003eDocs\u003c/a\u003e ·\n        \u003ca href=\"https://yuescript.org/try\"\u003eTry Online\u003c/a\u003e ·\n        \u003ca href=\"https://discord.gg/cRJ2VAm2NV\"\u003eDiscord\u003c/a\u003e\n      \u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"doc/docs/.vitepress/public/image/mascot/electrichearts_20260211A_yuescript_xiaoyu.png\" width=\"360\" alt=\"Xiaoyu, the YueScript mascot\"/\u003e\n\u003c/p\u003e\n\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e\u003cb\u003eXiaoyu (小玉)\u003c/b\u003e · Official YueScript Mascot\u003c/sub\u003e\n\u003c/p\u003e\n\n[![IppClub](https://img.shields.io/badge/IppClub-Certified-11A7E2?logo=data%3Aimage%2Fsvg%2Bxml%3Bcharset%3Dutf-8%3Bbase64%2CPHN2ZyB2aWV3Qm94PSIwIDAgMjg4IDI3NCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjIiPjxwYXRoIGQ9Im0xNDYgMzEgNzIgNTVWMzFoLTcyWiIgc3R5bGU9ImZpbGw6I2Y2YTgwNjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0xNjkgODYtMjMtNTUgNzIgNTVoLTQ5WiIgc3R5bGU9ImZpbGw6I2VmN2EwMDtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Ik0yNiAzMXY1NWg4MEw4MSAzMUgyNloiIHN0eWxlPSJmaWxsOiMwN2ExN2M7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aC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MDAgMjItNDEgMTIgMjctMzQgMTRaIiBzdHlsZT0iZmlsbDojNGUyNzVhO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0ibTEwNiA2MCA0MS0xLTIzIDQxLTE4LTQwWiIgc3R5bGU9ImZpbGw6IzdiMTI4NTtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0xMDggMjA0IDMxLTQ4aC0zMXY0OFoiIHN0eWxlPSJmaWxsOiNiYTAwNzc7ZmlsbC1ydWxlOm5vbnplcm8iLz48cGF0aCBkPSJtNjUgMjc0IDMzLTUySDBsNjUgNTJaIiBzdHlsZT0iZmlsbDojZWY3YTAwO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTc3IDI3NGg2N2wtNDAtNDUtMjcgNDVaIiBzdHlsZT0iZmlsbDojYTgxZTI0O2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTE2NyAyMjJoNThsLTM0IDUyLTI0LTUyWiIgc3R5bGU9ImZpbGw6IzExYTdlMjtmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Im0yNzAgMjc0LTQ0LTUyLTM1IDUyaDc5WiIgc3R5bGU9ImZpbGw6IzA1N2NiNztmaWxsLXJ1bGU6bm9uemVybyIvPjxwYXRoIGQ9Ik0yNzUgNTVoLTU3VjBoMjV2MzFoMzJ2MjRaIiBzdHlsZT0iZmlsbDojZGUwMDVkO2ZpbGwtcnVsZTpub256ZXJvIi8%2BPHBhdGggZD0iTTE4NSAzMWg1N3Y1NWgtMjVWNTVoLTMyVjMxWiIgc3R5bGU9ImZpbGw6I2M1MTgxZjtmaWxsLXJ1bGU6bm9uemVybyIvPjwvc3ZnPg%3D%3D\u0026labelColor=fff)](https://ippclub.org) [![Ubuntu](https://github.com/pigpigyyy/Yuescript/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/pigpigyyy/Yuescript/actions/workflows/ubuntu.yml) [![Windows](https://github.com/pigpigyyy/Yuescript/actions/workflows/windows.yml/badge.svg)](https://github.com/pigpigyyy/Yuescript/actions/workflows/windows.yml) [![macOS](https://github.com/pigpigyyy/Yuescript/actions/workflows/macos.yml/badge.svg)](https://github.com/pigpigyyy/Yuescript/actions/workflows/macos.yml) [![Discord Badge](https://img.shields.io/discord/844031511208001577?color=5865F2\u0026label=Discord\u0026logo=discord\u0026logoColor=white\u0026style=flat-square)](https://discord.gg/cRJ2VAm2NV)\n\nYueScript is a MoonScript dialect that compiles to Lua. It is derived from [MoonScript](https://github.com/leafo/moonscript) `0.5.0` and continues to adopt new features to stay up to date.\n\n## Quick Links\n\n- Website: \u003chttps://yuescript.org\u003e\n- Documentation: \u003chttps://yuescript.org/doc\u003e\n- Changelog: [`CHANGELOG.md`](./CHANGELOG.md)\n- Discord: \u003chttps://discord.gg/cRJ2VAm2NV\u003e\n\n## Overview\n\nMoonScript has been used to build real-world projects such as [Lapis](https://github.com/leafo/lapis), [itch.io](https://itch.io), and [streak.club](https://streak.club). As the original implementation became harder to evolve without risking compatibility, YueScript was created as a modernized code base for pushing the language forward.\n\nYueScript is both a production-ready compiler and a playground for exploring new syntax and programming paradigms that make MoonScript-style development more expressive and productive.\n\nYue (月) is the Chinese word for moon and is pronounced [jyɛ].\n\n## About Dora SSR\n\nYueScript is being developed and maintained alongside the open-source game engine [Dora SSR](https://github.com/ippclub/Dora-SSR). It has been used to create engine tools, game demos and prototypes, validating its capabilities in real-world scenarios while enhancing the Dora SSR development experience.\n\n## Features\n\n- Based on a modified [parserlib](https://github.com/axilmar/parserlib) with performance enhancements. `lpeg` is no longer required.\n- Written in C++17.\n- Supports most MoonScript features and generates Lua code in a style compatible with the original compiler.\n- Preserves source line numbers in generated Lua to improve debugging.\n- Adds features like macros, existential operator, pipe operator, JavaScript-like export syntax, and more.\n- See [`CHANGELOG.md`](./CHANGELOG.md) for more details.\n\n## Installation\n\n### Lua Module\n\nBuild `yue.so` with:\n\n```sh\n\u003e make shared LUAI=/usr/local/include/lua LUAL=/usr/local/lib/lua\n```\n\nThen get the binary file from `bin/shared/yue.so`.\n\nOr install via [LuaRocks](https://luarocks.org):\n\n```sh\n\u003e luarocks install yuescript\n```\n\nThen require the YueScript module in Lua:\n\n```lua\nrequire(\"yue\")(\"main\") -- require `main.yue`\n\nlocal yue = require(\"yue\")\nlocal codes, err, globals = yue.to_lua([[\nf = -\u003e print \"hello world\"\nf!\n]],{\n  implicit_return_root = true,\n  reserve_line_number = true,\n  lint_global = true\n})\n```\n\n### Binary Tool (CLI)\n\nClone this repo, then build and install executable with:\n\n```sh\n\u003e make install\n```\n\nBuild YueScript tool without macro feature:\n\n```sh\n\u003e make install NO_MACRO=true\n```\n\nBuild YueScript tool without built-in Lua binary:\n\n```sh\n\u003e make install NO_LUA=true\n```\n\nUse YueScript tool with:\n\n```sh\n\u003e yue -h\nUsage: yue\n       [options] [\u003cfile/directory\u003e] ...\n       yue -e \u003ccode_or_file\u003e [args...]\n       yue -w [\u003cdirectory\u003e] [options]\n       yue -\n\nNotes:\n   - '-' / '--' must be the first and only argument.\n   - '-o/--output' can not be used with multiple input files.\n   - '-w/--watch' can not be used with file input (directory only).\n   - with '-e/--execute', remaining tokens are treated as script args.\n\nOptions:\n   -h, --help                 Show this help message and exit.\n   -e \u003cstr\u003e, --execute \u003cstr\u003e  Execute a file or raw codes\n   -m, --minify               Generate minified codes\n   -r, --rewrite              Rewrite output to match original line numbers\n   -t \u003coutput_to\u003e, --output-to \u003coutput_to\u003e\n                              Specify where to place compiled files\n   -o \u003cfile\u003e, --output \u003cfile\u003e Write output to file\n   -p, --print                Write output to standard out\n   -b, --benchmark            Dump compile time (doesn't write output)\n   -g, --globals              Dump global variables used in NAME LINE COLUMN\n   -s, --spaces               Use spaces in generated codes instead of tabs\n   -l, --line-numbers         Write line numbers from source codes\n   -j, --no-implicit-return   Disable implicit return at end of file\n   -c, --reserve-comments     Reserve comments before statement from source codes\n   -w [\u003cdir\u003e], --watch [\u003cdir\u003e]\n                              Watch changes and compile every file under directory\n   -v, --version              Print version\n   -                          Read from standard in, print to standard out\n                              (Must be first and only argument)\n   --                         Same as '-' (kept for backward compatibility)\n\n   --target \u003cversion\u003e         Specify the Lua version that codes will be generated to\n                              (version can only be 5.1 to 5.5)\n   --path \u003cpath_str\u003e          Append an extra Lua search path string to package.path\n   --\u003ckey\u003e=\u003cvalue\u003e            Pass compiler option in key=value form (existing behavior)\n\n   Execute without options to enter REPL, type symbol '$'\n   in a single line to start/stop multi-line mode\n```\n\n### Common Usage\n\n- Recursively compile every YueScript file with extension `.yue` under current path: `yue .`\n- Compile and save results to a target path: `yue -t /target/path/ .`\n- Compile and reserve debug info: `yue -l .`\n- Compile and generate minified codes: `yue -m .`\n- Execute raw codes: `yue -e 'print 123'`\n- Execute a YueScript file: `yue -e main.yue`\n\n## Mascot (Xiaoyu / 小玉)\n\nXiaoyu (小玉) is YueScript's official mascot, a cyber rabbit often seen perched on a crescent moon and coding on a laptop.\n\n- English page: [here](https://yuescript.org/doc/extras/mascot.html)\n- Artwork by [Tyson Tan](https://tysontan.com)\n\n## Editor Support\n\n- [Vim](https://github.com/pigpigyyy/YueScript-vim)\n- [ZeroBraneStudio](https://github.com/pkulchenko/ZeroBraneStudio/issues/1134) (Syntax highlighting)\n- [Visual Studio Code](https://github.com/pigpigyyy/yuescript-vscode)\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fippclub%2Fyuescript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fippclub%2Fyuescript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fippclub%2Fyuescript/lists"}