How arnodel/golua works
Main Components
a) Compilation Pipeline:
• Scanner/Lexer (scanner package)
• Parser (parsing package)
• AST (ast package)
• IR Compiler (astcomp package)
• Bytecode Compiler (ircomp package)
b) Runtime System:
• Runtime Environment (runtime package)
• Thread Management
• Value System
• Garbage Collection (runtime/internal/luagc)
c) Standard Library Implementation:
• Core Libraries (lib directory)
• Go Integration (golib package)
[Source Code] -> [Compilation Pipeline] -> [Runtime System] -> [Program Execution]
Where:
Compilation Pipeline:
• Lexer/Scanner | --> | Parser | --> | AST | --> | IR Compiler| --> | Code Builder|
Runtime System:
• Runtime Environment|
• Thread Management | <-> | Value System | <-> | Standard Libs |
• Garbage Collection|
Important Relationships
a) Compilation Flow:
• Transformation from source code through various compilation stages
• Intermediate representations (AST → IR → Bytecode)
b) Runtime Integration:
• How the runtime interacts with compiled code
• Thread management and coroutine support
• Garbage collection integration
c) Library System:
• How standard libraries connect to the runtime
• Go integration points
• Safety/quota system integration
Implementation Details to Note
• No third-party dependencies
• Complete Lua 5.4 implementation
• Safe execution environment support
• Go package import capability
• Standard library implementation status