wasm-posix-host
    Preparing search index...

    Interface CentralizedWorkerInitMessage

    Init message for centralized-mode Workers. These Workers don't instantiate a kernel — they use channel IPC to communicate with the CentralizedKernelWorker.

    interface CentralizedWorkerInitMessage {
        argv?: string[];
        channelOffset: number;
        cwd?: string;
        env?: string[];
        forkBufAddr?: number;
        forkChildThreadArgPtr?: number;
        forkChildThreadFnPtr?: number;
        isForkChild?: boolean;
        kernelAbiVersion?: number;
        memory: Memory;
        pid: number;
        ppid: number;
        programBytes: ArrayBuffer;
        programModule?: Module;
        ptrWidth?: 4 | 8;
        type: "centralized_init";
    }
    Index

    Properties

    argv?: string[]

    Optional argv

    channelOffset: number

    Channel offset within the shared Memory for this thread's syscall channel

    cwd?: string

    Optional cwd

    env?: string[]

    Optional env vars to set up in the program

    forkBufAddr?: number

    Address of the fork save-buffer in memory (used for fork child rewind)

    forkChildThreadArgPtr?: number
    forkChildThreadFnPtr?: number

    Entry-point override for fork children created by a non-main thread.

    A pthread worker that calls fork() unwinds through its pthread entry function, not _start. The fork child must therefore enter that function directly before wpk_fork_rewind_begin can replay back to the saved fork site.

    isForkChild?: boolean

    If true, this is a fork child — drive wpk_fork_rewind_begin instead of normal _start

    kernelAbiVersion?: number

    Kernel's advertised ABI version (read from its __abi_version export at kernel startup). Worker compares against the program's own __abi_version export and refuses mismatches.

    memory: Memory

    Shared Memory for this process (also shared with CentralizedKernelWorker)

    pid: number
    ppid: number
    programBytes: ArrayBuffer

    User program bytes (compiled with channel_syscall.c — no kernel imports)

    programModule?: Module

    Pre-compiled WebAssembly module (avoids recompilation in web workers)

    ptrWidth?: 4 | 8

    Pointer width: 4 for wasm32, 8 for wasm64. Defaults to 4.

    type: "centralized_init"