Module nix_wasm

D implementation for WASM support in Determinate Nix.

Provides value types, a bump allocator, and host-imported function wrappers for building Nix builtins that compile to WebAssembly.

See Also

Nix WASM protocol specification

Functions

NameDescription
makeArrayOrPanic(a, count) Allocates a T[] of count elements from the region, panicking on failure.
nixPanic(msg) Aborts execution with a message sent to the Nix host.
nixWarn(msg) Sends a warning message to the Nix host.

Structs

NameDescription
AttrEntry A name-value pair used to construct Nix attribute sets.
AttrInput Wire format for passing attribute set entries to the host.
AttrOutput Wire format for receiving attribute set entries from the host.
Value Wrapper around a host-managed Nix value identifier.

Enums

NameDescription
Type Nix value type tags corresponding to the host evaluator's type system.

Aliases

NameTypeDescription
ValueId uint Opaque handle identifying a Nix value managed by the host evaluator.