A minimal 30-line framework for object-oriented programming in Lua with classes, inheritance, and mixins.
30log is a minimalistic framework for object-oriented programming in Lua, providing essential features like classes, single inheritance, metamethods, and mixins in just 30 lines of code. It solves the need for a lightweight OOP solution in Lua without the overhead of larger libraries.
Lua developers who need a simple, embeddable object-oriented programming library for projects where code size and minimal dependencies are critical, such as game development with frameworks like Codea or embedded scripting.
Developers choose 30log for its extreme minimalism and elegance, offering core OOP functionality without bloat, full compatibility with multiple Lua versions, and optional Class-Commons interoperability for broader library support.
30 lines library for object orientation in Lua
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
At only 30 lines of code, 30log is extremely lightweight, making it ideal for embedding in resource-constrained environments without bloating projects, as emphasized in the README's philosophy.
Supports Lua 5.1, 5.2, 5.3, and LuaJIT, ensuring it works across various Lua implementations, as highlighted by the badges and features list in the README.
Includes a plugin for the Class-Commons interface, allowing seamless integration with other Lua OOP libraries that adopt this standard, as detailed in the README section.
With support for named and unnamed classes and clean syntax, it serves as an excellent tool for teaching object-oriented programming concepts in Lua, aligning with its minimalistic design.
Only supports single inheritance and basic mixins, lacking advanced features like multiple inheritance, interfaces, or sophisticated metaprogramming tools, which the README explicitly lists as core capabilities.
The README directs users to a separate wiki for full documentation, and the main source file uses compressed syntax that can be hard to read, with the author admitting to 'ugly syntax' in the 30log-clean.lua section.
The cutting-edge release from Git cloning 'might be unstable,' as warned in the README's download instructions, which could lead to breaking changes or bugs in development environments.