Cargo Features

[dependencies]
i-slint-core = { version = "1.4.1", default-features = false, features = ["ffi", "libm", "rtti", "std", "unsafe-single-threaded", "unicode", "software-renderer-systemfonts", "software-renderer", "software-renderer-rotation", "image-decoders", "svg", "box-shadow-cache", "shared-fontdb", "fontdb", "serde", "gettext-rs"] }
ffi

Expose C ABI

Affects graphics::ffi, flickable::slint_flickable_data_init, flickable::slint_flickable_data_free, text::slint_textinput_set_selection_offsets, text::slint_textinput_select_all, text::slint_textinput_clear_selection, text::slint_textinput_cut, text::slint_textinput_copy, text::slint_textinput_paste, items::slint_item_absolute_position, window::ffi

libm

Enables libm of euclid and num-traits

rtti

Allow the viewer to query at runtime information about item types

Affects i-slint-core::rtti

std default = image-decoders, lyon_algorithms, lyon_extra, lyon_geom, lyon_path, scoped-tls-hkt, svg

Use the standard library

Enables web-time, std of euclid and once_cell

Affects item_rendering::ItemCache, item_rendering::ItemRenderer.draw_path, renderer::RendererSealed.register_font_from_memory, renderer::RendererSealed.register_font_from_path

unsafe-single-threaded

Unsafe feature meaning that there is only one core running and all thread_local are static.
You can only enable this feature if you are sure that any API of this crate is only called from a single core, and not in a interrupt or signal handler.

unicode default = unicode-linebreak, unicode-script
software-renderer-systemfonts = fontdue, rustybuzz, shared-fontdb, software-renderer

Affects fonts::vectorfont, fonts::systemfonts

software-renderer software-renderer-systemfonts? = bytemuck

Affects i-slint-core::software_renderer

software-renderer-rotation

This is under a feature flag because it is experimental feature.

default = std, unicode

These default features are set whenever i-slint-core is added without default-features = false somewhere in the dependency tree.

image-decoders std

Enables clru and image

Affects image::cache, image::load_image_from_embedded_data

svg std = shared-fontdb

Enables resvg ^0.38.0

box-shadow-cache

Affects graphics::boxshadowcache

shared-fontdb software-renderer-systemfonts? svg?

Enables shared-fontdb of i-slint-common

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features.

lyon_algorithms std
lyon_geom std
lyon_path std
lyon_extra std
scoped-tls-hkt std
unicode-linebreak unicode
unicode-script unicode
bytemuck software-renderer?
fontdb implicit feature

Enables fontdb

fontdb:

A simple, in-memory font database with CSS-like queries

serde implicit feature

Enables serde

serde:

A generic serialization/deserialization framework

rustybuzz not wasm32 software-renderer-systemfonts?

Enables rustybuzz ^0.12.0

gettext-rs unix implicit feature

Enables gettext-rs

gettext-rs:

Safe bindings for gettext

Affects translations::gettext_bindtextdomain

fontdue not wasm32 software-renderer-systemfonts?