Introduction to Ink
Ink is a mini program engine designed specifically for AR glasses operating systems. It enables developers to build high-performance AR applications using standard JavaScript and CSS-like layout, while leveraging the power of Rust and native rendering.
Why Ink?
- Performance: AR devices demand high frame rates and low latency. Ink uses Rust for its core logic and Skia for direct rendering to the native surface (e.g., Android SurfaceView), bypassing the overhead of traditional web views.
- Portability: The engine is designed to be embedded into various host operating systems, with a primary focus on Android-based AR platforms.
- Familiarity: Developers can use familiar web technologies (JavaScript, Flexbox) to build interfaces.
Key Features
- JavaScript Runtime: Integrated with QuickJS for a lightweight and secure execution environment.
- Native Rendering: Uses Skia to render UI elements directly, ensuring crisp text and smooth graphics.
- Flexbox Layout: Powered by Taffy, supporting standard flexbox layouts.
- Modular Architecture: Clean separation between the platform layer (Android), core engine (Rust), and script runtime.