nupp.runtime.services.system

Canonical host.system API 1 environment contract.

Setup selects service before requiring nupp.system. 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. Native and browser implementations are selected only from the artifact's compatible provider catalog; explicit setup selection takes priority.

Module contents

Types

TypeKindDescription
ProviderinterfaceFacts and a parallelism query for the executing ABI.

Values

ValueKindDescription
servicevariableSelect during setup before the system facade loads.

Types#

Providerinterface#

interface Provider
    readonly platform: string
    readonly architecture: string
    readonly endianness: string
    readonly pointerBits: integer
    readonly availableParallelism: function(): integer
end

Facts and a parallelism query for the executing ABI.

Methods

availableParallelism#
availableParallelism: function(): integer

Estimates usable execution units, always at least one.

Returns
TypeDescription
integer

Fields

platform#
platform: string

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

architecture#
architecture: string

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

endianness#
endianness: string

Byte order: little or big.

pointerBits#
pointerBits: integer

Pointer width in bits: 32 or 64.

Values#

servicevariable#

const service: services.Service<Provider>

Select during setup before the system facade loads.