Skip to content

HoloScript Language Interoperability Architecture

HoloScript is a 22-connection language interop hub that compiles from a single source language to 15+ target languages/formats spanning VR/AR/XR, web, mobile, robotics, IoT, and AI ecosystems.


Executive Summary

HoloScript's architecture mirrors the best patterns from the broader language interop world:

PatternIndustry ParallelHoloScript Implementation
Write once, compile everywhereSlang (shader cross-compilation)Single AST → 15+ platform compilers
Universal scene interchangeOpenUSD, glTFJSON AST as bridge format
Polyglot compositionWASM Component ModelRust/WASM + TypeScript dual parser
AI tool integrationMCP Protocol@holoscript/mcp-server package
Editor integrationLanguage Server Protocol@holoscript/lsp package

The Seven Interop Dimensions

1. Game Engine Compilation (VR/Gaming)

CompilerTarget LanguageTarget PlatformOutput
UnityCompilerC#Unity (URP)MonoBehaviour, GameObjects, DOTween
UnrealCompilerC++Unreal Engine 5.0-5.4AActor, UPROPERTY, Niagara, Enhanced Input
GodotCompilerGDScriptGodot 4.0-4.3Node3D, MeshInstance3D, RigidBody3D
VRChatCompilerUdonSharp/C#VRChat SDK3Udon scripts, VRC_Pickup, Prefabs

Location: packages/core/src/compiler/

2. Web/Graphics Runtime (Browser)

CompilerTargetOutput
BabylonCompilerBabylon.js/TypeScriptScene, MeshBuilder, PBRMaterial, XR setup
WebGPUCompilerWebGPU/WGSLDevice init, WGSL shaders, compute pipelines
BrowserRuntimeThree.jsLive execution with 50+ trait handlers

Location: packages/core/src/compiler/, packages/runtime/src/browser/

3. Apple/Android XR (Mobile Platforms)

CompilerTarget LanguageFramework
VisionOSCompilerSwiftRealityKit, ImmersiveSpace, ModelEntity
AndroidXRCompilerKotlinJetpack XR, ARCore, SceneCore, Filament

Location: packages/core/src/compiler/

4. Industrial/Robotics (Beyond VR)

CompilerTarget FormatDomain
URDFCompilerURDF XMLROS 2 / Gazebo robotics simulation
SDFCompilerSDF XMLGazebo simulation (richer than URDF)
DTDLCompilerDTDL v3 JSONAzure Digital Twins

Key Insight: HoloScript reaches beyond VR/AR/XR into the industrial ecosystem:

  • URDF: Objects → robot links, physics traits → inertial properties, constraints → joints
  • SDF: Full world export with physics engine selection (ODE, Bullet, DART)
  • DTDL: Templates → Interfaces, state → Properties, event handlers → Commands

Location: packages/core/src/compiler/

5. 3D Standards Interchange

PipelineTarget FormatConsumers
USDZPipelineUSDA (ASCII)Apple ecosystem, Pixar, Autodesk, OpenUSD readers

Pipeline: HoloScript AST → USDA text → usdz_converter → .usdz

Location: packages/core/src/compiler/USDZPipeline.ts

6. AI/Agent Integration

SystemTechnologyPurpose
@holoscript/mcp-serverModel Context ProtocolAI agents parse/validate/generate HoloScript
AI AdaptersOpenAI, Anthropic APIsLLM-powered code generation
SemanticSearchServiceVector searchSemantic code search
TrainingDataGeneratorJSONL outputFine-tuning data generation

Location: packages/mcp-server/, packages/core/src/ai/

7. IoT/Protocol Layer

SystemStandardPurpose
ThingDescriptionGeneratorW3C WoT TD v1.1Export objects as IoT Things
MQTTClientMQTT 3.1.1/5.0Pub/sub messaging for IoT
DTDLCompilerAzure DTDL v3Digital twin models

Location: packages/core/src/wot/, packages/core/src/runtime/protocols/


Complete Language Interop Matrix

Outbound Compilation (HoloScript → Target)

SourceTargetMechanismLocation
HoloScriptC#UnityCompilerpackages/core/src/compiler/UnityCompiler.ts
HoloScriptC++UnrealCompilerpackages/core/src/compiler/UnrealCompiler.ts
HoloScriptSwiftVisionOSCompilerpackages/core/src/compiler/VisionOSCompiler.ts
HoloScriptKotlinAndroidXRCompilerpackages/core/src/compiler/AndroidXRCompiler.ts
HoloScriptGDScriptGodotCompilerpackages/core/src/compiler/GodotCompiler.ts
HoloScriptUdonSharpVRChatCompilerpackages/core/src/compiler/VRChatCompiler.ts
HoloScriptTypeScriptBabylonCompilerpackages/core/src/compiler/BabylonCompiler.ts
HoloScriptWGSLWebGPUCompilerpackages/core/src/compiler/WebGPUCompiler.ts
HoloScriptWAT/WASMWASMCompilerpackages/compiler-wasm/
HoloScriptUSDAUSDZPipelinepackages/core/src/compiler/USDZPipeline.ts
HoloScriptURDF XMLURDFCompilerpackages/core/src/compiler/URDFCompiler.ts
HoloScriptSDF XMLSDFCompilerpackages/core/src/compiler/SDFCompiler.ts
HoloScriptDTDL JSONDTDLCompilerpackages/core/src/compiler/DTDLCompiler.ts
HoloScriptWoT TD JSONThingDescriptionGeneratorpackages/core/src/wot/
HoloScriptJSON ASTParser (TS + Rust)packages/core/, packages/compiler-wasm/

Bidirectional Integrations

IntegrationProtocolDirectionLocation
TypeScript API@holoscript/core↔️ Bidirectionalpackages/core/
Rust/WASM@holoscript/wasm↔️ Parse/Validatepackages/compiler-wasm/
AI AgentsMCP Protocol↔️ Tool-basedpackages/mcp-server/
IDE IntegrationLSP↔️ Full IDEpackages/lsp/
DatabasePostgreSQL↔️ Persistencepackages/adapter-postgres/
IoT MessagingMQTT↔️ Pub/Subpackages/core/src/runtime/protocols/
Live RuntimeThree.js↔️ Executionpackages/runtime/src/browser/

Total unique language/format connections: 22


Dual Parser Architecture

HoloScript Source (.hs / .hsplus / .holo)

    ┌────┴────┐
    │         │
TypeScript   Rust/WASM
  Parser      Parser
    │         │
    ▼         ▼
HoloComposition   JSON AST
    AST       (serde)
    │         │
    └────┬────┘

    JSON AST (Universal Bridge)

    ┌────┼────┬────┬────┬────┐
    │    │    │    │    │    │
  Unity Unreal WebGPU URDF DTDL ... (18+ targets)

Key Implementation Details:

  1. TypeScript Parser (packages/core/src/parser/): Primary parser, full feature support
  2. Rust/WASM Parser (packages/compiler-wasm/): 10x faster, JSON output via serde
  3. Universal Bridge: JSON AST enables any language to consume HoloScript parse results

WASM Parser API

rust
// packages/compiler-wasm/src/lib.rs
#[wasm_bindgen]
pub fn parse(source: &str) -> String;       // Returns JSON AST

#[wasm_bindgen]
pub fn parse_pretty(source: &str) -> String; // Pretty-printed JSON

#[wasm_bindgen]
pub fn validate(source: &str) -> String;     // Validation result

#[wasm_bindgen]
pub fn validate_detailed(source: &str) -> String; // Detailed diagnostics

Trait-to-Platform Mapping

Abstract traits map to platform-specific implementations:

HoloScript TraitUnityvisionOSGodotURDF/ROS 2
@physicsRigidbodyPhysicsBodyComponentRigidBody3D<inertial>
@grabbableXR_Grab_InteractableDragGestureXRController3D
@audioAudioSourceAudioFileResourceAudioStreamPlayer3D
@materialMaterial(URP)PhysicallyBasedMaterialStandardMaterial3D
@collisionColliderCollisionComponentCollisionShape3D<collision>

Package Ecosystem

PackagePurposeInterop Role
@holoscript/coreParser, compilers, ASTSource of truth
@holoscript/runtimeExecution enginesLive runtime
@holoscript/cliCommand-line interfaceBuild orchestration
@holoscript/lspLanguage ServerIDE integration
@holoscript/mcp-serverAI tool serverAgent integration
@holoscript/compiler-wasmRust/WASM parser10x performance
@holoscript/partner-sdkAPI, webhooks, analyticsPartner integration
@holoscript/stdStandard libraryTrait definitions
@holoscript/marketplace-apiTrait registryPackage distribution

Industry Alignment

HoloScript PatternIndustry ParallelSimilarity
Single source → multiple compilersSlang shader languageWrite once, deploy everywhere
Scene graph AST as interchangeOpenUSD / glTFUniversal scene description
WASM parser for polyglot embeddingWASM Component ModelLanguage-neutral computation
MCP server for AI integrationModel Context ProtocolTool-use interface for agents
LSP for editor supportLanguage Server ProtocolUniversal IDE integration
Trait-based compositionECS (Flecs, Bevy, Unity DOTS)Component over inheritance

Expansion Vectors (Roadmap)

Priority 1: glTF/GLB Export

  • Gap: No direct glTF export despite being the web's universal 3D format
  • Solution: Add GLTFPipeline using @gltf-transform/core
  • Impact: Three.js, Babylon.js, A-Frame, PlayCanvas, Cesium

Priority 2: Python Bindings

  • Gap: Robotics/ML workflows heavily use Python
  • Solution: Expose @holoscript/wasm via Python's wasmer or wasmtime
  • Impact: ROS 2, PyBullet, Isaac Sim, Jupyter notebooks

Priority 3: Tree-sitter Grammar

  • Gap: LSP covers VS Code/Neovim but not Zed, Helix, Emacs
  • Solution: Write tree-sitter-holoscript grammar
  • Impact: 10+ additional editors, Semgrep SAST

Priority 4: Bidirectional Import

  • Gap: All compilation is HoloScript → target, never reverse
  • Solution: Unity .unity / Godot .tscn / glTF → HoloScript converters
  • Impact: Migration path for existing projects

Priority 5: WASM Component Model

  • Gap: Current WASM compiler emits WAT; no Component Model support
  • Solution: WASI Preview 3 + WIT interfaces
  • Impact: True polyglot composition

Key Insights

W.001: AST is the Keystone

HoloScript's power is in its AST - a single parsed representation fans out to 15+ compilation targets spanning VR, web, mobile, robotics, IoT, and AI.

W.002: JSON AST Bridge

The JSON AST is the universal bridge - TypeScript emits it, Rust/WASM emits it, and any consumer language can read it. This is the interop keystone.

W.003: Beyond VR/XR

HoloScript reaches far beyond VR/AR/XR:

  • Robotics: URDF/SDF for ROS 2/Gazebo
  • Industrial IoT: DTDL for Azure Digital Twins, WoT for W3C, MQTT for messaging
  • AI: MCP for agent integration

References

Specifications

Industry Parallels


Last updated: 2026-02-09Source: uAA2++ Protocol Research Phase

Released under the MIT License.