# source_roots

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-build/theme_roots/function-source_roots/

**function** · [`ferroui-build`](/docs/0.5.0/api/ferroui-build/) · v0.5.0

```rust
fn source_roots<'t>(references: &ferroui_build_scan::scanner::SourceReferences, themes: impl IntoIterator<Item = &'t ferroui_build_scan::xaml_metadata::ThemeUnitsModel>, graph: &TypeGraph) -> Roots
```

The roots the Rust sources of an application state (#568, step 4): its names that are a type
key of a unit of `themes` or a class of `graph` (`CalendarView::new()`, `Ref<ListBox>`, a
`use` of `CalendarView`), and its string literals that are a key a unit of `themes` defines
(`"AccentButtonStyle"`, `"TextFillColorPrimaryBrush"`). Conservative: a name or a string that
matches roots its units whatever the code does with it. A name the code builds at run time
matches nothing, and needs `theme-roots`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Build.Tasks/theme_roots.rs#L249)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
