summaryrefslogtreecommitdiff
path: root/src/extension_loader.zig
diff options
context:
space:
mode:
authort <t@tjp.lol>2026-07-04 09:50:12 -0600
committert <t@tjp.lol>2026-07-05 16:23:49 -0600
commitf759f149377942c4e04802c45162cda1c9bfb2b3 (patch)
tree397dd2fc35839d8fcbf6a5c237bee363c6ed3c07 /src/extension_loader.zig
parent1ed07e2e4473b91c669c062bbfef6bb499f7d2b7 (diff)
big cli/tui gaps project
Diffstat (limited to 'src/extension_loader.zig')
-rw-r--r--src/extension_loader.zig9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/extension_loader.zig b/src/extension_loader.zig
index 1c29ceb..25c01e3 100644
--- a/src/extension_loader.zig
+++ b/src/extension_loader.zig
@@ -32,6 +32,15 @@
//! policy), call `entry.activate()`.
//!
//! Symlinks: followed normally. Dotfiles and `_`-prefixed files: skipped.
+//!
+//! ## Lifetime contract (extension authors, read this)
+//!
+//! The Lua state lives exactly as long as the session. `/new` and `/resume`
+//! tear the interpreter down and boot a fresh one through this same loader —
+//! entry evaluation and `activate()` run again, against the new session's
+//! agent. Module-global registries and other Lua-side state are therefore
+//! per-session by construction; nothing survives a session switch except
+//! what an extension itself persisted outside the VM.
const std = @import("std");
const panto = @import("panto");