Skip to main content

Crate voce_compiler_hybrid

Crate voce_compiler_hybrid 

Source
Expand description

Voce IR Hybrid Compiler — orchestrates DOM, WebGPU, and WASM compilers.

Analyzes each IR node to determine the optimal compile target:

  • Layout nodes (Container, Surface, TextNode) → DOM
  • 3D nodes (Scene3D, MeshNode, ParticleSystem) → WebGPU
  • Compute-heavy nodes (complex StateMachine, ComputeNode) → WASM

Produces a unified HTML output with embedded DOM + WebGPU canvas + WASM module.

Modules§

analysis
Target analysis — determines the optimal compile target for each IR node.
bundle
Output bundling — merges DOM, WebGPU, and WASM into a single HTML file.
device
Device profile — describes the target execution environment.
fallback
Graceful degradation — fallback chain for 3D content.

Structs§

HybridCompileOptions
Hybrid compilation options.
HybridCompileResult
Result of hybrid compilation.
TargetSummary
Summary of what was compiled to each target.

Enums§

CompileTarget
Possible compilation targets for a node.

Functions§

compile_hybrid
Compile IR with automatic per-component target selection.