Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Lua
  3. LuaMinify

LuaMinify

MITLua

A Lua source code minifier that strips comments, whitespace, and semantically renames local variables for minimal output.

GitHubGitHub
271 stars51 forks0 contributors

What is LuaMinify?

LuaMinify is a Lua source code minifier that reduces code size by stripping comments, whitespace, and semantically renaming local variables. It includes a Lua lexer, parser, and static analysis tools to ensure correctness while minimizing output. The project solves the problem of deploying compact, performance-optimized Lua scripts in production environments.

Target Audience

Lua developers, particularly those working on Roblox or other embedded Lua environments, who need to reduce script size for performance or deployment constraints.

Value Proposition

Developers choose LuaMinify for its semantic variable renaming and AST-based accuracy, which ensures minified code remains functionally identical to the original. It provides reliable minification with support for complex Lua syntax like embedded strings.

Overview

Lua source code minifier.

Use Cases

Best For

  • Minifying Lua scripts for production deployment in games or applications
  • Reducing bandwidth usage for Lua code transmitted over networks
  • Optimizing Roblox Lua scripts for better performance in Roblox Studio
  • Performing static analysis on Lua source code using an AST
  • Embedding Lua in resource-constrained environments where code size matters
  • Preprocessing Lua code before obfuscation or further transformations

Not Ideal For

  • Projects needing exact reconstruction with comments and whitespace preserved
  • Teams requiring fast, lightweight minification without AST overhead
  • Developers seeking extensive integration with modern build tools or CI/CD pipelines
  • Applications where Lua code must remain human-readable after minification

Pros & Cons

Pros

Semantic Variable Renaming

Renames all local variables to shorter forms based on AST analysis, reducing code size while ensuring semantic correctness, as highlighted in the features.

AST-Based Accuracy

Uses a full Lua scanner/parser to generate an AST, enabling precise handling of complex syntax like embedded strings and minimizing errors during minification.

Roblox Plugin Integration

Includes a dedicated Roblox plugin for seamless minification within Roblox Studio, making it convenient for game developers targeting that platform.

Command Line Utility

Provides easy-to-use shell and batch files for quick minification from the command line, with simple syntax for input and output files.

Cons

Incomplete Reconstruction Features

Full and exact reconstruction modes are listed as TODOs in the README, limiting options for developers who need to preserve comments or specific formatting.

Limited Ecosystem Support

As a standalone tool, it lacks integrations with package managers or build systems, requiring manual setup for automated workflows.

Performance Trade-Offs

AST-based processing, while accurate, can be slower than simpler minifiers, especially for large codebases, due to the overhead of parsing and transformation.

Sparse Documentation

The README is brief and lacks detailed examples or API documentation for using the lexer/parser in custom static analysis projects.

Frequently Asked Questions

Quick Stats

Stars271
Forks51
Contributors0
Open Issues6
Last commit3 years ago
CreatedSince 2012

Tags

#roblox#lexer#lua#ast#parser#static-analysis

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
MetaluaMetalua

The metalua programming language

Stars369
Forks63
Last commit2 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