{"id":13897013,"url":"https://github.com/stetre/moonlibs","last_synced_at":"2026-02-11T08:54:30.846Z","repository":{"id":90017940,"uuid":"78525400","full_name":"stetre/moonlibs","owner":"stetre","description":"Lua libraries for graphics and audio programming","archived":false,"fork":false,"pushed_at":"2023-05-19T11:10:45.000Z","size":862,"stargazers_count":222,"open_issues_count":4,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-11-25T02:33:26.032Z","etag":null,"topics":["audio","fsm","gpu-programming","graphics","lua","lua-bindings"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stetre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2017-01-10T11:01:03.000Z","updated_at":"2024-11-24T03:00:32.000Z","dependencies_parsed_at":"2024-11-25T04:35:27.779Z","dependency_job_id":null,"html_url":"https://github.com/stetre/moonlibs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stetre/moonlibs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonlibs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonlibs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonlibs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonlibs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stetre","download_url":"https://codeload.github.com/stetre/moonlibs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stetre%2Fmoonlibs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29330760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T06:13:03.264Z","status":"ssl_error","status_checked_at":"2026-02-11T06:12:55.843Z","response_time":97,"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":["audio","fsm","gpu-programming","graphics","lua","lua-bindings"],"created_at":"2024-08-06T18:03:17.249Z","updated_at":"2026-02-11T08:54:30.837Z","avatar_url":"https://github.com/stetre.png","language":null,"readme":"## MoonLibs - Graphics and Audio Lua Libraries\n\nA collection of libraries for graphics, audio, and heterogeneous programming in [Lua](https://www.lua.org) (\u003e= 5.3), mostly bindings to popular C/C++ libraries.\n\nThey currently run \n[on GNU/Linux](#installing-on-gnulinux) and (most of them) [on Windows](#installing-on-windows) with MSYS2/MinGW-w64.\nA few of them also run [on MacOS](#installing-on-macos), thanks to contributions from other developers.\n\nThe libraries do not depend on each other, so they can be selectively installed (they must, actually, since this repository is only a collector of links to the repos of the individual libraries).\n\nFor bug reports, suggestions, etc., please open an issue in the repo of the relevant library.\n\n_Author:_ _[Stefano Trettel](https://www.linkedin.com/in/stetre)_\n\n\n\n[![Lua logo](./powered-by-lua.gif)](https://www.lua.org/)\n\n* **GPU rendering and computing:**\n  * [**MoonGL**](https://github.com/stetre/moongl) ([doc](https://stetre.github.io/moongl/doc/index.html)) - bindings to **OpenGL** (3.x - 4.x).\n  * [**MoonCL**](https://github.com/stetre/mooncl) ([doc](https://stetre.github.io/mooncl/doc/index.html)) - bindings to **OpenCL**.\n  * [**MoonVulkan**](https://github.com/stetre/moonvulkan) ([doc](https://stetre.github.io/moonvulkan/doc/index.html)) - bindings to **Vulkan**.\n* **Windowing, input handling, GUI:**\n  * [**MoonGLFW**](https://github.com/stetre/moonglfw) ([doc](https://stetre.github.io/moonglfw/doc/index.html)) - bindings to **GLFW**.\n  * [**MoonSDL2**](https://github.com/stetre/moonsdl2) ([doc](https://stetre.github.io/moonsdl2/doc/index.html)) - bindings to **SDL2**.\n  * [**MoonFLTK**](https://github.com/stetre/moonfltk) ([doc](https://stetre.github.io/moonfltk/doc/index.html)) - bindings to **FLTK** (Fast Light Toolkit).\n  * [**MoonNuklear**](https://github.com/stetre/moonnuklear) ([doc](https://stetre.github.io/moonnuklear/doc/index.html)) - bindings to **Nuklear**.\n  * _[MoonGLUT](https://github.com/stetre/moonglut) (discontinued) - bindings to FreeGLUT._\n* **Math and Physics:**\n  * [**MoonGLMATH**](https://github.com/stetre/moonglmath) ([doc](https://stetre.github.io/moonglmath/doc/index.html)) - **graphics math** library for MoonGL and MoonVulkan.\n  * [**MoonChipmunk**](https://github.com/stetre/moonchipmunk) ([doc](https://stetre.github.io/moonchipmunk/doc/index.html)) - bindings to the **Chipmunk2D** game dynamics library.\n  * [**MoonCCD**](https://github.com/stetre/moonccd) ([doc](https://stetre.github.io/moonccd/doc/index.html)) - bindings to the **libccd** collision detection library.\n  * [**MoonODE**](https://github.com/stetre/moonode) ([doc](https://stetre.github.io/moonode/doc/index.html)) - bindings to the **ODE** (Open Dynamics Engine) 3D physics library.\n* **Concurrency, State Machines:**\n  * [**MoonTimers**](https://github.com/stetre/moontimers) ([doc](https://stetre.github.io/moontimers/doc/index.html)) - Concurrent **timers**.\n  * [**MoonAgents**](https://github.com/stetre/moonagents) ([doc](https://stetre.github.io/moonagents/doc/index.html)) - SDL-oriented **reactive state machines**.\n  * [**MoonSC**](https://github.com/stetre/moonsc) ([doc](https://stetre.github.io/moonsc/doc/index.html)) - SCXML-based **Harel statecharts**.\n* **Image loading:**\n  * [**MoonImage**](https://github.com/stetre/moonimage) ([doc](https://stetre.github.io/moonimage/doc/index.html)) - **STB image** based image loading library.\n  * _[MoonSOIL](https://github.com/stetre/moonsoil) (discontinued) - bindings to the Simple OpenGL Image Library._\n* **Model loading:**\n  * [**MoonAssimp**](https://github.com/stetre/moonassimp) ([doc](https://stetre.github.io/moonassimp/doc/index.html)) - bindings to **Assimp** (Open Asset Import Library).\n* **Text rendering:**\n  * [**MoonFreeType**](https://github.com/stetre/moonfreetype) ([doc](https://stetre.github.io/moonfreetype/doc/index.html)) - bindings to **FreeType**.\n  * [**MoonFonts**](https://github.com/stetre/moonfonts) ([doc](https://stetre.github.io/moonfonts/doc/index.html)) - bitmap fonts, bindings to **STB fonts**.\n* **Audio:**\n  * [**MoonSndFile**](https://github.com/stetre/moonsndfile) ([doc](https://stetre.github.io/moonsndfile/doc/index.html)) - bindings to **libsndfile**.\n  * [**MoonAL**](https://github.com/stetre/moonal) ([doc](https://stetre.github.io/moonal/doc/index.html)) - bindings to **OpenAL**.\n  * [**LuaJACK**](https://github.com/stetre/luajack) ([doc](https://stetre.github.io/luajack/doc/index.html)) - bindings to **JACK** (JACK Audio Connection Kit).\n* **Other:**\n  * [**MoonTypes**](https://github.com/stetre/moontypes) ([doc](https://stetre.github.io/moontypes/doc/index.html)) - a **C-like typedef** for Lua.\n  * [**MoonUSB**](https://github.com/stetre/moonusb) ([doc](https://stetre.github.io/moonusb/doc/index.html)) - bindings to **libusb**.\n\n---\n\n* [Installation instructions](#installation-instructions)\n  * [Installing on GNU/Linux](#installing-on-gnulinux)\n  * [Installing on Windows](#installing-on-windows)\n  * [Installing on MacOS](#installing-on-macos)\n* [Dependencies](#dependencies)\n* [Examples](#examples)\n* [Tweaks](#tweaks)\n  * [Lua version](#lua-version)\n  * [Install location](#install-location)\n\n---\n\n### Installation instructions\n\n**TLDR** - Provided you have already installed the toolchain ([GNU/Linux](#installing-on-gnulinux), [Windows](#installing-on-windows), [MacOS](#installing-on-macos)) and the needed [dependencies](#dependencies), to install a library of the collection\nall you have to do is clone it, enter its base directory, compile and install. E.g. for MoonFLTK:\n\n```bash\n$ git clone https://github.com/stetre/moonfltk\n$ cd moonfltk\nmoonfltk$ make\nmoonfltk$ make install # or: $ sudo make install\n```\n\nTo uninstall it:\n\n```bash\nmoonfltk$ make uninstall # or: $ sudo make uninstall\n```\n\n---\n\n#### Installing on GNU/Linux\n\nThe following instructions show how to install the libraries on Ubuntu.\nTo install on a GNU/Linux distribution other than Ubuntu, replace `apt` with the package manager used by\nthe distribution (the names of the packages may also differ).\n\n##### Install the toolchain and Lua\n\nInstall the following packages (if you don't have them already):\n\n```bash\n$ sudo apt install make\n$ sudo apt install binutils\n$ sudo apt install gcc\n$ sudo apt install git\n```\n\nInstall the [latest version](https://www.lua.org/download.html) of Lua:\n\n```bash\n$ sudo apt install libreadline-dev\n$ wget https://www.lua.org/ftp/lua-5.3.4.tar.gz\n$ tar -zxpvf lua-5.3.4.tar.gz\n$ cd lua-5.3.4\nlua-5.3.4$ make linux\nlua-5.3.4$ sudo make install\n```\n\n##### Install a library\n\nThe following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection.\n\nFirst, install any [dependencies](#dependencies) needed by the library. MoonFLTK needs FLTK, which you can install by typing:\n\n```bash\n$ sudo apt install libfltk1.3-dev\n```\n\nThen clone the library (or, if you prefer, download the latest release tarball and decompress, it),\nenter its base directory, compile, and install:\n\n```bash\n$ git clone https://github.com/stetre/moonfltk\n$ cd moonfltk\nmoonfltk$ make\nmoonfltk$ sudo make install\n```\n\nTo uninstall the library:\n\n```bash\nmoonfltk$ sudo make uninstall\n```\n\n---\n\n#### Installing on Windows\n\nThe following instructions show how to install the libraries on Windows with MSYS2/MinGW-w64.\n\n##### Install MSYS2/MinGW-w64\n\nDownload the [MSYS2 installer](https://msys2.github.io/) and\nfollow the instructions from the download page.\n\n##### Install the toolchain and Lua\n\nIn the following, we'll assume that you installed MSYS2 in the default location `C:\\msys32`. If not, change the paths below accordingly to your chosen location.\n\nOpen a MinGW shell (using the shell launcher `C:\\msys32\\mingw32.exe` or `mingw64.exe`, depending on your architecture), and install the following packages:\n\n```bash\n$ pacman -S make\n$ pacman -S tar\n$ pacman -S git\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-gcc\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-lua\n```\n\nAppend one of the following two paths, depending on your architecture, to the PATH environment variable:\n- `C:\\msys32\\mingw32\\bin`   (corresponding to `/mingw32/bin` under MSYS2, for 32-bit), or\n- `C:\\msys32\\mingw64\\bin`   (corresponding to `/mingw64/bin` under MSYS2, for 64-bit).\n\n(To do so, right click `Computer-\u003eProperties-\u003eAdvanced System Settings-\u003eEnvironment variables`,\nthen search for the `PATH` or `Path` system variable, edit it, and append a semicolon (`;`) followed by the path).\n\nNow your environment is ready and you should be able to execute the Lua interpreter from the Windows command prompt, by just typing `lua` in it (to exit from the interpreter, type `os.exit()` or `Ctrl-C` in it).\n\n##### Install a library\n\nThe following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection, provided it is supported on Windows.\n\nFirst, open a MinGW shell and from there install any [dependencies](#dependencies) needed by the library. MoonFLTK needs FLTK, which you can install by typing:\n\n```bash\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-fltk\n```\n\nThen clone the library (or, if you prefer, download the latest release tarball and decompress, it),\nenter its base directory, compile, and install:\n\n```bash\n$ git clone https://github.com/stetre/moonfltk\n$ cd moonfltk\nmoonfltk$ make\nmoonfltk$ make install\n```\n\nTo uninstall the library:\n\n```bash\nmoonfltk$ make uninstall\n```\n---\n\n#### Installing on MacOS\n\nThe following instructions show how to install the libraries on MacOS.\n\n##### Install Homebrew\n\n```sh\n/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"\n```\n##### Install Lua\n\n```bash\n$ brew install lua@5.3\n$ brew install luarocks\n```\n\n##### Install a library\n\nThe following instructions show how to install MoonFLTK, but the same procedure applies to any other any other library of the collection, provided it is supported on MacOS.\n\nFirst, install any [dependencies](#dependencies) needed by the library. MoonFLTK needs FLTK, which you can install by typing:\n\n```bash\n$ brew install fltk\n```\n\nThen clone the library (or, if you prefer, download the latest release tarball and decompress, it),\nenter its base directory, compile, and install:\n\n```bash\n$ git clone https://github.com/stetre/moonfltk\n$ cd moonfltk\nmoonfltk$ make\nmoonfltk$ sudo make install\n```\n\n(If MacOS says that _The Git command requires the command line developer tools_, click _Install_ and Agree to the License Agrement.)\n\nTo uninstall the library:\n\n```bash\nmoonfltk$ sudo make uninstall\n```\n\n---\n\n\n### Dependencies\n\nThe same procedures shown above for MoonFLTK apply to any other library of the collection,\nand differ only in the dependencies (if any, other than Lua and the C standard libraries) that need\nto be installed.\n\nThe dependencies needed by the different libraries are listed below.\n\nGNU/Linux (Ubuntu):\n\n```bash\n$ sudo apt install libfltk1.3-dev     # needed only by MoonFLTK\n$ sudo apt install libglfw3-dev       # needed only by MoonGLFW\n$ sudo apt install freeglut3-dev      # needed only by MoonGLUT\n$ sudo apt install libglew-dev        # needed only by MoonGL\n$ sudo apt install libassimp-dev      # needed only by MoonAssimp\n$ sudo apt install libfreetype6-dev   # needed only by MoonFreeType\n$ sudo apt install libsndfile1-dev    # needed only by MoonSndFile\n$ sudo apt install libopenal-dev      # needed only by MoonAL\n$ sudo apt install chipmunk-dev       # needed only by MoonChipmunk\n$ sudo apt install libode-dev         # needed only by MoonODE\n$ sudo apt install libjack-jackd2-dev # needed only by LuaJack\n$ sudo apt install libccd2-dev        # needed only by MoonCCD\n$ sudo apt install libsdl2-dev        # needed only by MoonSDL2\n$ sudo apt install libsdl2-image-dev  # needed only by MoonSDL2\n$ sudo apt install libsdl2-mixer-dev  # needed only by MoonSDL2\n$ sudo apt install libsdl2-ttf-dev    # needed only by MoonSDL2\n```\n\nWindows (MSYS2/MinGW-w64):\n\n```bash\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-fltk        # needed only by MoonFLTK\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-glfw        # needed only by MoonGLFW\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-freeglut    # needed only by MoonGLUT\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-glew        # needed only by MoonGL\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-assimp      # needed only by MoonAssimp\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-freetype    # needed only by MoonFreeType\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-libsndfile  # needed only by MoonSndFile\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-openal      # needed only by MoonAL\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-chipmunk    # needed only by MoonChipmunk\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-ode         # needed only by MoonODE\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-SDL2        # needed only by MoonSDL2\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-SDL2_image  # needed only by MoonSDL2\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-SDL2_mixer  # needed only by MoonSDL2\n$ pacman -S ${MINGW_PACKAGE_PREFIX}-SDL2_ttf    # needed only by MoonSDL2\n```\n\nMacOS:\n\n```bash\n$ brew install fltk        # needed only by MoonFLTK\n$ brew install glfw        # needed only by MoonGLFW\n$ brew install glew        # needed only by MoonGL\n```\n\n\n\n---\n\n### Examples\n\nEach library comes with a few examples, which are located in the `examples/` directory of the\nsource package.\n\nOther examples, typically using more than one library, can be found in the `examples/` directory\nof this repository.\n\nThe examples are Lua scripts that can be executed with the standard Lua interpreter.\n\n#### Running the examples\n\nOn **GNU/Linux**, the examples can be executed from the command line. To run, say, the `fltk/valuators.lua` example, assuming the MoonFLTK source package is located in `/home/ste/moonfltk`:\n\n```bash\n$ cd /home/ste/moonfltk/examples/fltk\nfltk$ lua valuators.lua\n```\n\nOn **Windows**, the examples can be executed either in a MinGW shell or from a Windows command prompt.\n\nLet's assume the MoonFLTK source package is located in `/home/ste/moonfltk` under MSYS2, which corresponds to the `C:\\msys32\\home\\ste\\moonfltk` folder under Windows.\n\nTo run, say, the `fltk/valuators.lua` example in a MinGW shell:\n\n```bash\n$ cd /home/ste/moonfltk/examples/fltk\nfltk$ lua valuators.lua\n```\n\nTo run the same example from a Windows command prompt:\n\n```dos\nC:\\\u003e cd \\msys32\\home\\ste\\moonfltk\\examples\\fltk\nC:\\msys32\\home\\ste\\moonfltk\\examples\\fltk\u003e lua valuators.lua\n```\n\n---\n\n### Tweaks\n\n#### Lua version\n\nAll libraries currently attempt to detect the version of the installed Lua interpreter. If the attempt fails, they assume Lua 5.3.\nIt is possible to compile/install/uninstall explicitly for a given Lua version using the `LUAVER` variable.\nFor example, to compile and install for Lua 5.4:\n\n```bash\nmoonfltk$ make LUAVER=5.4\nmoonfltk$ make LUAVER=5.4 install # or: $ sudo make LUAVER=5.4 install\n```\n\n#### Install location\n\nBy default, the libraries are installed under the `/usr/local/` directory hierarchy.\nThis is a fairly standard install directory and it is recommended since the Lua interpreter\nusually has no problem in locating modules when installed here.\n\nIt is possible to install the libraries in a different location by overriding the `PREFIX`\nvariable (whose default value is `/usr/local`) and letting Lua know at run time where to find\nthem, by adding the path `$PREFIX/share/lua/$LUAVER/?.lua` to `LUA_PATH` and the path\n`$PREFIX/lib/lua/$LUAVER/?.so` to `LUA_CPATH`.\n\n\nFor example, to install MoonFLTK under `/tmp/myloc`:\n\n```bash\nmoonfltk$ make\nmoonfltk$ make PREFIX=/tmp/myloc install\n```\n\n(Note that this will create the directory tree structure, if not already existing.)\n\nThen set the Lua paths accordingly before running the applications, e.g.:\n\n```bash\nmoonfltk$ LUA_PATH=/tmp/myloc/share/lua/5.3/?.lua\nmoonfltk$ LUA_CPATH=/tmp/myloc/lib/lua/5.3/?.so\nmoonfltk$ cd examples/fltk\nfltk$ lua valuators.lua\n\n","funding_links":[],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonlibs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstetre%2Fmoonlibs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstetre%2Fmoonlibs/lists"}