{"id":47532567,"url":"https://github.com/Pika-Software/gm_moonloader","last_synced_at":"2026-04-11T16:00:55.241Z","repository":{"id":166477277,"uuid":"641901305","full_name":"Pika-Software/gm_moonloader","owner":"Pika-Software","description":"Integrate Yuescript/Moonscript into your Garry's Mod!","archived":false,"fork":false,"pushed_at":"2024-12-07T13:51:50.000Z","size":395,"stargazers_count":14,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-07T14:17:43.704Z","etag":null,"topics":["garrys-mod","garrysmod","garrysmod-module","gmod","moonscript","yuescript"],"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/Pika-Software.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":"2023-05-17T12:02:53.000Z","updated_at":"2024-12-07T13:47:35.000Z","dependencies_parsed_at":"2023-09-26T14:12:19.370Z","dependency_job_id":"d30de371-9905-41b7-971b-5e216530739d","html_url":"https://github.com/Pika-Software/gm_moonloader","commit_stats":null,"previous_names":["Pika-Software/gm_moonloader"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/Pika-Software/gm_moonloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pika-Software%2Fgm_moonloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pika-Software%2Fgm_moonloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pika-Software%2Fgm_moonloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pika-Software%2Fgm_moonloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pika-Software","download_url":"https://codeload.github.com/Pika-Software/gm_moonloader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pika-Software%2Fgm_moonloader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31686141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"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":["garrys-mod","garrysmod","garrysmod-module","gmod","moonscript","yuescript"],"created_at":"2026-03-28T00:01:05.695Z","updated_at":"2026-04-11T16:00:55.216Z","avatar_url":"https://github.com/Pika-Software.png","language":"C++","readme":"# gm_moonloader\nIntegrate **[Moonscript][1]/[Yuescript][2]** into your Garry's Mod!\n\nThis binary module seamlessly integrates [Moonscript][1] and [Yuescript][2] into Garry's Mod, by adding include of plain `.moon`/`.yue` files and support for auto-reload.\n\nJust add `require \"moonloader\"` line into your autorun!\n\n## How to install\n1. Go to [latest release](https://github.com/Pika-Software/gm_moonloader/releases/latest)\n2. Download binary for your OS and Garry's Mod branch. For example `gmsv_moonloader_linux32.dll`\n3. Put downloaded binary into `\u003cYour Garry's Mod Folder\u003e/garrysmod/lua/bin/` (if it doesn't exists then create folder)\n4. Enjoy! 🎉\n\n## How to use\n1. Add require before any `AddCSLuaFile` or `include`\n```lua\nrequire \"moonloader\"\n```\n2. Include your `.moon`/`.yue` file with `include`\n```lua\n-- you need to pass `.lua` to include since Garry's Mod wont accept anything else\n-- but gm_moonloader will find a .moon file and load it\ninclude \"example/init.lua\" -- Will automatically generate .lua from .moon/.yue in garrysmod/cache/moonloader/lua\n```\n\n## Notes\n* Compiled `.moon`/`.yue` files are stored in `garrysmod/cache/moonloader/lua` folder. This folder is cleaned up after each startup.\n\n## Example\n```lua\n-- autorun/example_autorun.lua\nif SERVER then\n    require \"moonloader\"\nend\n\nAddCSLuaFile \"example/init.lua\"\ninclude \"example/init.lua\"\n```\n```lua\n-- example/init.moon\nprint \"Hello from Moonscript! ##{i}\" for i = 1, 5 \n```\n\n## API\n```lua\n---- Constants ----\nmoonloader._NAME = \"gm_moonloader\"\nmoonloader._AUTHORS = \"Pika-Software\"\nmoonloader._VERSION = \"\u003ccurrent version, e.g. 1.2.3-main.2150cd6\u003e\"\nmoonloader._VERSION_MAJOR = 1\nmoonloader._VERSION_MINOR = 2\nmoonloader._VERSION_PATCH = 3\nmoonloader._BRANCH = \"main\"\nmoonloader._COMMIT = \"2150cd6\"\nmoonloader._URL = \"https://github.com/Pika-Software/gm_moonloader\"\n\n---- Functions ----\n-- Compiles given moonscript code into lua code\n-- and returns lua_code with compiled line and char offset from moonCode\n-- If fails, returns nil and error reason\n-- Same as moonscript.to_lua (https://moonscript.org/reference/api.html)\nluaCode: string/nil, lineTable: table/string\n    = moonloader.ToLua(moonCode: string)\n\n-- Compiles given yuescript code into lua code\n-- See https://yuescript.org/doc/#lua-module\nluaCode: string/nil, err: string/nil, globals: table/nil\n    = moonloader.yue.ToLua(yueCode: string, options: table/nil)\n\n-- Recursively compiles and caches all .moon files in given lua directory\n-- Use this to add compiled .lua files into Source filesystem\n-- Returns nothing\nmoonloader.PreCacheDir(path: string)\n\n-- Tries to compile given file in lua directory\n-- and return true if successful, otherwise false\nsuccess: bool = moonloader.PreCacheFile(path: string)\n```\n\n## Compilation\n1. Clone this repo with submodules\n```bash\ngit clone https://github.com/Pika-Software/gm_moonloader --recursive\n```\n\n2. Clone my [garrysmod_common](https://github.com/dankmolot/garrysmod_common) \nrepo with branch `master-cmake` or `x86-64-cmake`\n```bash\ngit clone https://github.com/dankmolot/garrysmod_common --branch=master-cmake --recursive\n```\n\n3. Configure cmake project\n```bash\ncd gm_moonloader\nmkdir -p build \u0026\u0026 cd build\ncmake .. -DGARRYSMOD_COMMON_PATH=\"../../garrysmod_common\" -DBUILD_SHARED_LIBS=OFF\n# Optionally also use -DAUTOINSTALL=\u003cpath to garrysmod/lua/bin\u003e\n```\n\n4. Build it!\n```\ncmake --build . -j -t moonloader --config Release\n```\n\n5. (Optional) Configure project to build 32bit library\n```bash\n# On Windows\ncmake -A Win32 .. # and other options...\n# On Linux\ncmake .. -DCMAKE_C_FLAGS=\"-m32\" -DCMAKE_CXX_FLAGS=\"-m32\" # and other options...\n```\n\n6. (Optional) Configure client-side library\n```bash\ncmake .. -DCLIENT_DLL=ON\n```\n\n## Contributing\nFeel free to create issues or pull requests! ❤️\n\n## Licenese\n[MIT License](/LICENSE)\n\n[1]: \u003chttps://github.com/leafo/moonscript\u003e \"Moonscript\"\n[2]: \u003chttps://github.com/pigpigyyy/Yuescript\u003e \"Yuescript\"\n","funding_links":[],"categories":["Projects"],"sub_categories":["emacs"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPika-Software%2Fgm_moonloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPika-Software%2Fgm_moonloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPika-Software%2Fgm_moonloader/lists"}