wesl
    Preparing search index...

    Interface LinkParams

    interface LinkParams {
        conditions?: Conditions;
        config?: LinkConfig;
        constants?: Record<string, string | number>;
        debugWeslRoot?: string;
        libs?: WeslBundle[];
        mangler?: ManglerFn;
        rootModuleName?: string;
        virtualLibs?: Record<string, VirtualLibraryFn>;
        weslSrc: Record<string, string>;
    }
    Index

    Properties

    conditions?: Conditions

    runtime conditions for conditional compiling with

    and friends

    config?: LinkConfig

    plugins and other configuration to use while linking

    constants?: Record<string, string | number>

    Host (ts/js) provided wgsl constants. Users can import the values from wesl code via the constants' virtual library: import constants::num_lights;`

    debugWeslRoot?: string

    For debug logging. Will be prepended to file paths.

    libs?: WeslBundle[]

    libraries available for the link

    mangler?: ManglerFn

    function to construct globally unique wgsl identifiers

    rootModuleName?: string

    name of root wesl module for an app, the root module normally contains the '@compute', '@vertex' or '@fragment' entry points for a library, the root module defines the public api fo the library can be specified as file path (./main.wesl), a module path (package::main), or just a module name (main)

    virtualLibs?: Record<string, VirtualLibraryFn>

    generate wesl from code at runtime

    weslSrc: Record<string, string>

    record of file paths and wesl text for modules. key is module path or file path package::foo::bar, or './foo/bar.wesl', or './foo/bar' value is wesl src

    Only accepts unix-style, relative filesystem paths that are valid WGSL identifiers

    • Unix-style: Slashes as separators.
    • Valid WGSL identifiers: No backslashes, no .., or other non-identifier symbols.
    • Relative paths: They have to be relative to the wesl root.