Pack
인터페이스, 리플렉션 분류
The serialisable result of buildManifest: see there.
import type { Pack } from 'typeshade'import type { Pack } from 'typeshade/runtime'
시그니처, 설명, 예제는 커밋 c66579bf의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
interface Pack { readonly schema: typeof PACK_SCHEMA; readonly compiler: string; readonly emit?: { readonly level?: 'O0' | 'O1' | 'O2'; readonly parens?: 'full' | 'minimal'; readonly fp64Flavor?: 'float' | 'integer'; }; readonly wgsl: string; readonly glsl?: { readonly vertex: string; readonly fragment: string }; readonly bindings: readonly PackBinding[]; readonly vertexLayout?: GpuVertexLayout; readonly entries: readonly PackEntry[]; readonly structs: readonly { readonly name: string; readonly fields: readonly { name: string; type: string }[]; }[]; readonly overrides: readonly PackOverride[]; readonly features: readonly string[]; readonly console?: PackConsole; readonly ir?: PortableIr; readonly gl?: { readonly draws: Readonly<Record<string, PackGlDraw | { readonly none: string }>>; };}인스턴스 속성
schema읽기 전용typeof PACK_SCHEMAThe manifest’s schema, which a reader checks first (Rule 11.10).
compiler읽기 전용stringThe package version that wrote it.
emit선택 사항읽기 전용{ readonly level?: 'O0' | 'O1' | 'O2'; readonly parens?: 'full' | 'minimal'; readonly fp64Flavor?: 'float' | 'integer'; }The options the program was emitted under, when the build gave any of the three a manifest can record (
packModule(m, { emit }), itspluginsapart, which it cannot): the optimizationlevel, theparensand thefp64Flavor. One the build did not give is absent and stands for its default ('O2','full'and'float'), and a manifest built with none has noemit. The load-time emitter emits the program again under them (Rule 11.10).wgsl읽기 전용stringglsl선택 사항읽기 전용{ readonly vertex: string; readonly fragment: string }bindings읽기 전용readonly PackBinding[]vertexLayout선택 사항읽기 전용GpuVertexLayoutThe first vertex entry’s vertex buffer, as
entries[].vertexgives each.entries읽기 전용readonly PackEntry[]structs읽기 전용readonly { readonly name: string; readonly fields: readonly { name: string; type: string }[]; }[]overrides읽기 전용readonly PackOverride[]features읽기 전용readonly string[]The
GPUFeatureNames a device must have to create the program’s pipelines.console선택 사항읽기 전용PackConsoleir선택 사항읽기 전용PortableIrThe program as portable IR, when the build asked for it: what
repack()emits again. Only the package version that wrote it reads it.gl선택 사항읽기 전용{ readonly draws: Readonly<Record<string, PackGlDraw | { readonly none: string }>>; }What the WebGL2 tier uses: each full-screen fragment entry’s draw, or why it has none.
소스
src/core/manifest-types.ts, 161행, 커밋 c66579bf 기준