Skip to content

Add design document summarizing codebase architecture#2

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/summarize-design-document
Draft

Add design document summarizing codebase architecture#2
Copilot wants to merge 2 commits intomasterfrom
copilot/summarize-design-document

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 26, 2026

Adds doc/design.md covering the full architecture of ngx_lua_cpp, derived from the current codebase.

  • Architecture overview — ASCII diagrams showing runtime component interaction: LuaJIT VM ↔ shared library ↔ nginx event loop ↔ thread pool
  • Component deep-divesngx_lua_cpp_t (Lua API surface), ngx_hooker_t (event loop hook + yield/resume mechanism + runtime co_ctx offset discovery), ngx_warp_t (strand config), iris library roles
  • Nginx integration — No-header-dependency approach via minimal forward declarations, runtime symbol resolution with dlsym/GetProcAddress, HTTP and stream subsystem detection
  • Threading model — Main warp polling, worker thread dispatch via co_await iris_switch, priority task routing
  • Build system — CMake setup, LuaJIT discovery, platform support matrix
  • Extension guide — How to add new C++ functions exposed to Lua
  • Security note — Warning on the debug console's arbitrary code execution endpoint

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Add design document summary to doc folder Add design document summarizing codebase architecture Mar 26, 2026
Copilot AI requested a review from paintdream March 26, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants