Skip to content

Rust API (Internal)

This section provides technical documentation for the paiOS engine Rust implementation. The engine is a runtime daemon that provides AI inference capabilities via gRPC over Unix Domain Sockets.

We provide two documentation formats to suit different needs:

Section titled “📖 Native Starlight Integration (Recommended)”

Best for: Understanding how Rust modules relate to the gRPC API and overall architecture.

  • ✅ Fully integrated with Starlight documentation
  • ✅ Consistent navigation and search
  • ✅ Cross-references with gRPC API docs
  • ✅ Contextual architecture information

Browse: Continue reading below or use the sidebar navigation.

Best for: Deep-dive into Rust types, traits, and implementations (familiar to Rust developers).

  • ✅ Standard rustdoc format (familiar to Rust developers)
  • ✅ Direct links to GitHub source code
  • ✅ Interactive type exploration
  • ✅ “Implementations” and “See also” links
Open Standard rustdoc

The engine crate is the core runtime for paiOS. It implements:

  • gRPC Service Layer (rpc/): Handles gRPC/UDS communication
  • Domain Logic (core/): SystemController and business rules
  • Inference Orchestration (orchestrator/): NPU/GPU/CPU resource management
  • Hardware Abstraction (hal/): Audio, HID, LED, and hardware backends

For the primary API documentation, see the gRPC API Reference.


engine Library

Core logic, structs, and common error types. View Library

Engine Runtime

CLI arguments, boot process, and daemon entry point. View Runtime