freya/_docs/platforms.rs
1//! # Platforms
2//!
3//! Freya supports multiple desktop platforms plus experimental Android support, each with a specific
4//! graphics backend configuration. The rendering is powered by [Skia](https://skia.org/) through the
5//! `skia-safe` bindings.
6//!
7//! ## Supported Platforms
8//!
9//! | Platform | Graphics Backend |
10//! |----------|-----------------|
11//! | Linux | Vulkan (preferred), OpenGL (fallback) |
12//! | Windows | Vulkan (preferred), OpenGL (fallback) |
13//! | macOS | Metal |
14//! | Android (experimental) | OpenGL |
15//!
16//! ## Rendering Backends
17//!
18//! ### Vulkan (Linux, Windows)
19//!
20//! The default and preferred rendering backend on Linux and Windows. Vulkan provides modern, high-performance
21//! GPU-accelerated rendering. Freya will use Vulkan when available.
22//!
23//! ### OpenGL (Linux, Windows)
24//!
25//! Used as a fallback on Linux and Windows when Vulkan is not available or not supported by the hardware.
26//! For debugging purposes, you can force OpenGL by setting the `FREYA_RENDERER` environment variable:
27//!
28//! ```sh
29//! FREYA_RENDERER=opengl cargo run
30//! ```
31//!
32//! ### Metal (macOS)
33//!
34//! The best graphics backend for macOS.
35//!
36//! ### OpenGL (Android)
37//!
38//! Used to render on Android, where Freya draws through Skia's OpenGL backend.
39//!
40//! ## Android
41//!
42//! Android support is highly experimental.
43//!
44//! Building for Android requires the Android SDK, the NDK and `cargo-ndk`. See the
45//! [`android`](https://github.com/marc2332/freya/tree/main/examples/android) example for a complete
46//! project setup and step-by-step build instructions.