Internal Intrinsics #1024
Labels
enhancement
New feature or request
feature
Large PRs or issues with full-blown features
security
General security-related topics
Milestone
Issue description
When "intrinsics" (what Elide calls built-in VM symbols, often provided by the host VM) are provided to guest scripts, they are always included, even when exposed through internal facade modules.
This isn't super great for a few reasons: (1) they always exist on the global stack, presumably consuming memory etc; (2) user code can see these symbols. Even though they are ugly and unlikely to collide with user symbols, we shouldn't expose these to guest code at all.
Instead, we should devise a way to determine what is "runtime-internal" code that happens to execute as guest code, vs. actual guest code, and make such intrinsics available only where needed and safe.
Node has a similar feature to this in their codebase, referred to as
primordials
. This object is made available as a VM global only to internal sources. Injection of builtins is simplified by mounting each symbol on a single object.The text was updated successfully, but these errors were encountered: