Opens a gpu device on the backend this machine has: Metal on a Mac, OpenGL elsewhere and where Metal is absent, Vulkan on Linux by name
loft install gpu_host
use gpu_host;
| Guide | none yet — the API reference and the source below are what there is |
|---|---|
| Version | 0.1.1 — published 2026-11-20 |
| Categories | Graphics and 3D · Games |
| Requires | loft >=2026.10.0 |
| Compatibility | API: no earlier release is a drop-in · stored data: no earlier release is a drop-in |
| Download | 9 kB |
| Public API | 4 items, with their documentation |
| Dependencies | gpu · gpu_gl · gpu_metal · gpu_vulkan |
| Used by | graphics |
| Source | read it here — the libraries are written in loft |
| Repository | https://github.com/loft-lang/loft-libs-graphics/tree/main/gpu_host |
A drop-in floor is the oldest release of this package the current one still replaces without a source change. Not declared means exactly that — the package has made no promise, which is the honest state for one published before the compatibility contract existed.