---
url: /api/platforms/rust/src.md
---
[pantoken-root](../../../index.md) / rust

# rust

## Compatibility

Target: Rust GUI frameworks. Current format: `Generated egui Color32 accessors and iced_core Color constants compile with the Rust toolchain`. Minimum host version: `1.95.0`. Tested through `1.95.0`. Newer releases require review.

[Full compatibility matrix](../../../../compatibility)

Experimental

`@pantoken/rust` — emit Instructure design tokens as Rust constants for the two mainstream native
Rust GUIs: **egui** (`Color32`) and **iced** (`Color`). Colours become the framework's colour
type; dimensions become `f32` (px). Web-rendered Rust UIs (Tauri, Dioxus-web, Leptos, Yew) should
use `@pantoken/css` instead.

## Interfaces

* [RustOptions](interfaces/RustOptions.md)

## Type Aliases

* [RustFormat](type-aliases/RustFormat.md)

## Functions

* [toRust](functions/toRust.md)
* [generateRust](functions/generateRust.md)

## References

### default

Renames and re-exports [generateRust](functions/generateRust.md)
