Cargo Features

[dependencies]
epaint = { version = "0.27.2", default-features = false, features = ["bytemuck", "cint", "color-hex", "deadlock_detection", "default_fonts", "extra_debug_asserts", "extra_asserts", "log", "mint", "puffin", "rayon", "serde", "unity", "document-features"] }
default = default_fonts

The default_fonts feature is set by default whenever epaint is added without default-features = false somewhere in the dependency tree.

bytemuck

bytemuck enables you to cast Vertex to &[u8].

Enables bytemuck of ecolor and emath and bytemuck

### Optional dependencies

cint

cint enables interoperability with other color libraries.

Enables cint of ecolor

color-hex

Enable the hex_color macro.

Enables color-hex of ecolor

deadlock_detection

This will automatically detect deadlocks due to double-locking on the same thread. If your app freezes, you may want to enable this! Only affects mutex::RwLock (which epaint and egui uses a lot).

Enables backtrace

default_fonts default

If set, epaint will use include_bytes! to bundle some fonts. If you plan on specifying your own fonts you may disable this feature.

extra_debug_asserts

Enable additional checks if debug assertions are enabled (debug builds).

Enables extra_debug_asserts of ecolor and emath

extra_asserts

Always enable additional checks.

Enables extra_asserts of ecolor and emath

log

Turn on the log feature, that makes egui log some errors using the log crate.

Enables log

mint

mint enables interoperability with other math libraries such as glam and nalgebra.

Enables mint of emath

puffin

Enable profiling with the puffin crate.

Only enabled on native, because of the low resolution (1ms) of clocks in browsers.

Enables puffin

rayon

Enable parallel tessellation using rayon.

This can help performance for graphics-intense applications.

Enables rayon

serde

Allow serialization using serde.

Enables serde of ahash, ecolor, and emath and serde

Allow serialization using serde .

unity

Change Vertex layout to be compatible with unity

Affects mesh::Vertex

Features from optional dependencies

document-features implicit feature

Enables document-features

Enable this when generating docs.