# capabilities Return a map describing the running binary's compiled-in feature set so code can branch on platform capability rather than rely on silent no-ops. This is a top-level stdlib function, available in every build — including the standalone scripting shell (`deft`), not just the workspace/TUI runtime. ## Syntax
[capabilities]
## Returns A map with the following keys: - `pixels` (bool) — true when GL pixel-mode commands (`draw/rect`, `draw/circle`, …) actually rasterize. False in ANSI-only and scripting builds. - `svg` (bool) — true when SVG files load via nanosvg (bundled with the GL build). - `textures` (bool) — true when raster image textures are available for `draw/image`. - `backend` (string) — `"gl"` for the full TUI binary, `"ansi"` for the lean text-only binary and the scripting shell. ## Example
def caps [capabilities]

if [get caps :pixels] {
   [draw/circle ctx 100 100 40 :red]
} else {
   [draw/text ctx 0 0 'O' :red]
}
## See Also `tui/layer-set`, `draw/rect`, `draw/image`