Expand description
The Node / web modules this crate serves, and the one table a host registers them from.
Each entry carries its specifiers, the ModuleDef the ES loader
declares, and the object require() hands back — so a host cannot
wire up the import form and forget the CommonJS one, and cannot serve
a module this crate does not know about.
Re-exports§
pub use crate::crypto::CryptoModule;pub use crate::buffer::BufferModule;pub use crate::url::UrlModule;
Structs§
- Assert
Module import assert from 'node:assert', and its always-strict twin.- Assert
Strict Module import assert from 'node:assert/strict'.- Events
Module import { EventEmitter } from 'node:events'— the vendored llrt emitter, which theEventTargetglobals already share.- Node
Module - One module, under every specifier it answers to.
- OsModule
import os from 'node:os'— host introspection, served by the vendoredllrt_os.- Path
Module import path from 'node:path'— pure-computation POSIX-style subset (the sandbox is always a unix-style path space).- Process
Module import process from 'node:process'— the module form of the global.- Stream
WebModule - Timers
Module import { setTimeout } from 'node:timers', and the promise twin.- Timers
Promises Module import { setTimeout } from 'node:timers/promises'.- Util
Module import util from 'node:util'— formatting, the promise/callback wrappers andutil.types.
Functions§
- modules
- Every module this crate serves. A host registers all of them or none:
the ES loader, the
requiretable and the bundler’s external list all read this one place.
Type Aliases§
- Declare
Fn - How a host declares one of these modules to the ES loader.
- Namespace
Fn - How a host builds the object
require('<specifier>')returns.