Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commit3bb1da2647

README.md

builtin_registration

Which of the built-in library's instances a boot registers, when it registers them, and the registration a reader asks for on first use.

The world-load onRegister sweep leaves the library out, so the prelude runs each library type's hook by type through this module. The set follows the engine's profile:

typeeditorruntime (a player)
pluginbootboot
fontbootboot
editorPanel, editorLayoutbootnever: a player has no editor
shaderModule, agentSkill, procPack, procGraphonce the world has loadedfirst use

A plugin's registration asks the plugin host to load it, and the host refuses a plugin whose plugin.yaml names no profile the engine booted under from the manifest alone, without reading its component.

A reader of a registry the boot left unregistered asks for it before it reads:

local BuiltinRegistration = require("@builtin::modules.builtin_registration")

BuiltinRegistration.ensure("agentSkill") -- registers the library's skills once

The readers that do: the skills toolbox (agentSkill, whose registration fills the roster an agent's tool responses carry) and the procedural graph registry (procPack, procGraph, registered when a read finds an op the library holds unregistered). A shader compile files each .shaderModule its source includes as it compiles.

The prelude starts the boot registration with boot() on a system task, and booted() reads where it stands (the profile it registered under, and whether every step has registered). plan(profile) lists the steps a boot under a profile registers, and run(profile, registerType, afterWorldLoaded, done) runs them.