Lux for Garry's Mod

Expressive Lux in. Ordinary GLua out.

Use one file for gradual GLua adoption, or build a full GMod project with packages, realm splitting, generated loaders, source maps, and a compiler-owned LSP.

single-file buildoptional autorun loaderregistryless packagescompiler LSP
import { arr } from "@lux/std"enum Badge repr number {  Admin = 1,  Alive = 2,  Dead = 3,}fn badgeOf(ply) =  ply?:IsAdmin() then Badge.Admin  else ply?:Alive() then Badge.Alive  else Badge.Deadfn tint(badge) =  match badge {    Badge.Admin => Color(255, 214, 92)    Badge.Alive => Color(84, 236, 166)    _ => Color(170, 178, 190)  }client fn rows(players) =  players    |> arr.filter(%, (ply) => IsValid(ply))    |> arr.map(%, (ply) => {      local badge = badgeOf(ply)      { name = ply?:Nick() ?? "unknown", color = tint(badge) }    })export client { scoreboardRows = rows }
Start smallCompile one file or recursively build a source folder into Lua while preserving relative paths for gradual GLua integration.Scale to addonsUse manifest-driven GMod builds for modules, client/server realms, relative-path-safe loaders, and optional autorun output.Packages without a registryInstall official and third-party package sets from explicit GitHub, URL, or local sources and lock the resolved graph.One compiler in editor and buildThe VS Code extension launches luxc lsp, so diagnostics, hover, definitions, package resolution, and builds share one version.