Versions in this module Expand all Collapse all v0 v0.0.0 Oct 8, 2026 Changes in this version + const DefaultMaxElements + const Fallback + const InvalidBatch + const InvalidRange + const MaxBatchPasses + const Success + const TypeF16 + const TypeF32 + const TypeF64 + const TypeI16 + const TypeI32 + const TypeI64 + const TypeI8 + const TypeU16 + const TypeU32 + const TypeU64 + const TypeU8 + const V1CPUFallback + const V1Cancelled + const V1ContentsLost + const V1DeviceError + const V1InvalidBinding + const V1InvalidHandle + const V1InvalidKernel + const V1InvalidRange + const V1InvalidState + const V1LimitExceeded + const V1OK + const V1TypeMismatch + const V1UnsupportedStorage + func CompileBufferWGSL(source []byte, kernel KernelConfig) (string, error) + func CompileWGSL(source []byte, export string) (string, error) + type BindingConfig struct + Access BufferAccess + Slot uint32 + Type ElementType + type BufferAccess uint8 + const AccessRead + const AccessReadWrite + const AccessWrite + type BufferOperation struct + Commit time.Duration + Compute time.Duration + Conversion time.Duration + Count uint32 + DeviceCompute time.Duration + DeviceCopy time.Duration + Download time.Duration + HardwareSubmitted bool + Import string + Instance wago.InstanceIdentity + KernelID uint32 + Outcome string + ProfileValid bool + QueueWait time.Duration + Reason string + ReasonCode string + Sequence uint64 + Status int32 + TimestampsValid bool + Total time.Duration + TransferCountsComplete bool + Upload time.Duration + type BufferSnapshot struct + ActiveCompilations uint32 + DeviceState string + Instances []InstanceDiagnostic + Kernels []KernelDiagnostic + Last BufferOperation + LegacyBufferBytes uint64 + PeakRuntimeBufferBytes uint64 + PendingCompilations uint32 + PendingContractBytes uint64 + PendingContracts uint32 + PendingTranslations uint32 + PendingWGSLBytes uint64 + PipelineHits uint64 + PipelineMisses uint64 + Reason string + RuntimeBufferBytes uint64 + RuntimePoolBytes uint64 + State string + Totals TransferCounters + TotalsComplete bool + type BuildTiming struct + Pipeline time.Duration + Translate time.Duration + type CompileError struct + Kind CompileErrorKind + Message string + func (e *CompileError) Error() string + type CompileErrorKind uint8 + const CompileInvalidContract + const CompileLimit + const CompileUnsupported + type Config struct + Disabled bool + KernelExport string + Kernels []KernelConfig + MaxBindingsPerKernel uint32 + MaxBuffersPerInstance uint32 + MaxElements uint32 + MaxInstanceBufferBytes uint64 + MaxKernelsPerModule uint32 + MaxRuntimeBufferBytes uint64 + MinElements uint32 + ProfileStages bool + RelaxedFloat bool + RunTimeout time.Duration + type ElementType uint32 + type Host struct + func NewHost(ctx context.Context, config Config) (*Host, error) + func (h *Host) BufferSnapshot() BufferSnapshot + func (h *Host) Close(ctx context.Context) error + func (h *Host) Compile(source []byte) (*Module, error) + func (h *Host) Instantiate(ctx context.Context, module *Module) (*wago.Instance, error) + func (h *Host) Prepare(source []byte) (*Preparation, error) + func (h *Host) Snapshot() Snapshot + type InstanceDiagnostic struct + BothCurrent uint32 + Buffers uint32 + CPUBytes uint64 + CPUCurrent uint32 + ContentsLost uint32 + GPUBytes uint64 + GPUCurrent uint32 + Instance wago.InstanceIdentity + LogicalBytes uint64 + PeakBytes uint64 + ReservedBytes uint64 + RetainedPoolBytes uint64 + ScratchBytes uint64 + StagingBytes uint64 + type KernelConfig struct + Bindings []BindingConfig + CPUExport string + Export string + ID uint32 + MinElements uint32 + RelaxedFloat bool + type KernelDiagnostic struct + ContractVerified bool + KernelID uint32 + Module wago.ModuleIdentity + Pipeline time.Duration + Reason string + State string + Translate time.Duration + type Module struct + func (m *Module) Close() error + type Plugin struct + func New(config Config) (*Plugin, error) + func (p *Plugin) BufferSnapshot() BufferSnapshot + func (p *Plugin) PluginSet() (wago.PluginSet, error) + func (p *Plugin) Register(reg *wago.Registrar) error + func (p *Plugin) Snapshot() Snapshot + type Preparation struct + func (p *Preparation) Close() error + func (p *Preparation) Compile() (*Module, error) + type Snapshot struct + BufferBytes uint64 + Build BuildTiming + Device string + DeviceInit time.Duration + Fallbacks uint64 + GPUFailed bool + Instances int + Last Timing + Modules int + Pending int + Pipelines int + Reason string + Successes uint64 + type Timing struct + Commit time.Duration + Compute time.Duration + DeviceCompute time.Duration + Download time.Duration + DownloadBytes uint64 + Passes uint32 + TimestampsValid bool + Total time.Duration + Upload time.Duration + UploadBytes uint64 + type TransferCounters struct + DeviceCopyBytes uint64 + DeviceCopyCount uint64 + DownloadCount uint64 + GPUDownloadBytes uint64 + GPUUploadBytes uint64 + GuestCopyBytes uint64 + GuestCopyCount uint64 + GuestSetBytes uint64 + GuestSetCount uint64 + LogicalDownloadBytes uint64 + LogicalUploadBytes uint64 + ParameterUploadBytes uint64 + ParameterUploadCount uint64 + UploadCount uint64