Skip to content

A14: Embed Lua 5.4 runtime #134

Open

Description

@Cadacious

Summary

Embed Lua 5.4 as a sandboxed scripting runtime for the intermediate modding tier. Lua scripts are loaded as modules via TOML lua = "path" entries.

Requirements

  • Embed Lua 5.4 (single C file compilation)
  • Sandbox: remove io, os, debug, loadfile, dofile, package
  • Keep: string, table, math, coroutine (limited), utf8
  • Memory limit: 16MB default per Lua state
  • Instruction limit: 1M per handler invocation
  • Each Lua module runs in its own Lua state (no shared variables)

Reference

Acceptance Criteria

  • Lua 5.4 compiles into the engine
  • Sandbox removes dangerous standard libraries
  • Memory and instruction limits enforced
  • Lua scripts load via lua = "path" in TOML
  • Unit tests for sandbox enforcement

Depends on: #122 (module loader), #121 (event bus)
Blocks: #120

Activity

  1. added
    phase-2Phase 2: Plugin Architecture + Game Client
    track-aTrack A: Plugin Architecture
    moddingMod support and extensibility
    on Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    moddingMod support and extensibilityphase-2Phase 2: Plugin Architecture + Game Clienttrack-aTrack A: Plugin Architecture

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions