Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Lua
  3. Metalua

Metalua

Lua

A Lua superset compiler and code analysis tool with compile-time meta-programming capabilities.

Visit WebsiteGitHubGitHub
369 stars63 forks0 contributors

What is Metalua?

Metalua is a programming language toolchain that extends Lua 5.1 with compile-time meta-programming capabilities. It serves as both a code analysis tool and a compiler for a superset of Lua, allowing developers to manipulate and generate code during the compilation phase rather than at runtime.

Target Audience

Lua developers who need advanced code generation, domain-specific language creation, or compile-time code transformation capabilities while maintaining compatibility with the Lua ecosystem.

Value Proposition

Metalua provides the only comprehensive compile-time meta-programming solution for Lua 5.1, offering powerful code manipulation capabilities while maintaining full compatibility with standard Lua, making it ideal for creating domain-specific languages and advanced code generation tools.

Overview

The metalua programming language

Use Cases

Best For

  • Creating domain-specific languages within the Lua ecosystem
  • Implementing advanced code generation and transformation tools
  • Extending Lua syntax with custom constructs and operators
  • Building static analysis tools for Lua codebases
  • Developing educational tools for teaching meta-programming concepts
  • Creating embedded scripting languages with enhanced compile-time capabilities

Not Ideal For

  • Projects requiring compatibility with Lua 5.2 or later versions without fallback to 5.1
  • Teams seeking a simple, runtime-only scripting solution without compile-time overhead
  • Developers unfamiliar with meta-programming concepts or compile-time code generation

Pros & Cons

Pros

Compile-Time Meta-Programming

Enables advanced code generation and transformation during compilation, as highlighted in the key features for creating domain-specific languages and tools.

Lua 5.1 Compatibility

Fully compatible with standard Lua 5.1, allowing seamless integration with existing Lua codebases without modification.

Modular Architecture

Separated into `metalua-parser` and `metalua-compiler` LuaRocks, providing flexibility for independent code analysis or full compilation workflows.

Dual Licensing Flexibility

Released under both MIT and EPL licenses, offering choice for permissive or copyleft project requirements, as noted in the README.

Cons

Limited to Lua 5.1

Does not support newer Lua versions like 5.2 or 5.4, which may restrict adoption in modern projects relying on updated Lua features.

Setup Complexity

Requires installing two separate LuaRocks (`metalua-parser` and `metalua-compiler`), complicating initial configuration compared to single-package tools.

Niche Use Case

Primarily focused on advanced meta-programming, resulting in fewer community resources, tutorials, and third-party integrations than mainstream Lua extensions.

Frequently Asked Questions

Quick Stats

Stars369
Forks63
Contributors0
Open Issues16
Last commit2 years ago
CreatedSince 2008

Tags

#programming-language#compiler#macros#lua-5.1#meta-programming#lua#code-analysis#compile-time

Built With

L
Lua

Links & Resources

Website

Included in

Lua4.5k
Auto-fetched 1 day ago

Related Projects

luacheckluacheck

A tool for linting and static analysis of Lua code.

Stars2,035
Forks334
Last commit3 years ago
Typed LuaTyped Lua

An Optional Type System for Lua

Stars587
Forks48
Last commit6 years ago
LuaMinifyLuaMinify

Lua source code minifier.

Stars271
Forks51
Last commit3 years ago
lua-parserlua-parser

A Lua 5.3 parser written with LPegLabel

Stars209
Forks32
Last commit4 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub