kernl API
    Preparing search index...

    Function createKernel

    • Compose the shell from the kernel and the modules the host lists, and nothing else: one EventStore, one RelayPool, one AccountManager, the relay tiers, the guard pipeline, the grants layer, kehto's services and createShellBridge, plus the applet lifecycle decodePointer → resolve → plan → mount. Applets are offered only what the kernel and those modules answer. @kernlize/kernel holds no module, so a host that lists its own loads only what it lists (D-068).

      Anything the host passes in options is used as is; anything missing is created with kernl's defaults. The host wires handleWindowMessage to the window once and supplies the frames; everything else is reached through KernlHost.

      Type Parameters

      Parameters

      • options: KernelOptions<M>

        Host hooks, optional pre-built parts and the modules.

      Returns Kernel & ModuleApis<M>

      The shell with each module's api beside it.

      import { createKernel, type KernlModule } from '@kernlize/kernel';
      const clock: KernlModule<'clock', { now(): number }> = { id: 'clock', setup: () => ({ api: { now: () => Date.now() } }) };
      const kernl = createKernel({ host, modules: [clock] });
      kernl.clock.now(); // milliseconds since the epoch