nupp.system.spi

Implementation interface for environment facts.

Importing this declaration loads no host implementation. Facts describe the executing Nupp ABI, including emulated environments, and remain fixed for the loaded facade. Providers report nonempty platform and architecture names, little or big endianness, and a 32- or 64-bit pointer width. They must agree with the target ABI used by generated code.

availableParallelism estimates the number of execution units usable by this process, including host restrictions, and returns an integer of at least one. It must not create a worker pool. The browser implementation may suspend while requesting host facts. The facade chooses an external implementation by priority, then uses its native or browser fallback when discovery is empty.

Module contents

Types

TypeKindDescription
ProviderinterfaceFacts and a parallelism query for the executing ABI.

Types#

Providerinterface#

interface Provider ...

Facts and a parallelism query for the executing ABI.

Members

NameKindDescription
priorityfield
platformfieldPlatform name, such as macos, linux, windows, or browser.
architecturefieldArchitecture name, such as aarch64, x8664, or wasm32.
endiannessfieldByte order: little or big.
pointerBitsfieldPointer width in bits: 32 or 64.
availableParallelismmethodEstimates usable execution units, always at least one.

priorityfield#

priority: integer?
@readonly

platformfield#

platform: string
@readonly

Platform name, such as macos, linux, windows, or browser.

architecturefield#

architecture: string
@readonly

Architecture name, such as aarch64, x86_64, or wasm32.

endiannessfield#

endianness: string
@readonly

Byte order: little or big.

pointerBitsfield#

pointerBits: integer
@readonly

Pointer width in bits: 32 or 64.

availableParallelismmethod#

availableParallelism: function(): integer
@readonly

Estimates usable execution units, always at least one.

Returns
TypeDescription
integer