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
| Type | Kind | Description |
|---|---|---|
Provider | interface | Facts and a parallelism query for the executing ABI. |
Types#
Providerinterface#
interface Provider ...Facts and a parallelism query for the executing ABI.
Members
| Name | Kind | Description |
|---|---|---|
priority | field | |
platform | field | Platform name, such as macos, linux, windows, or browser. |
architecture | field | Architecture name, such as aarch64, x8664, or wasm32. |
endianness | field | Byte order: little or big. |
pointerBits | field | Pointer width in bits: 32 or 64. |
availableParallelism | method | Estimates usable execution units, always at least one. |
architecturefield#
architecture: stringArchitecture name, such as aarch64, x86_64, or wasm32.
availableParallelismmethod#
availableParallelism: function(): integerEstimates usable execution units, always at least one.
Returns
| Type | Description |
|---|---|
integer |