# register_assets

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/platform/function-register_assets/

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

```rust
fn register_assets(crate_name: &str, assets: &[(&str, &'static [u8])])
```

Registers the assets embedded by a crate, addressable as
`<asset scheme>://<crate_name>/<path>`.

Paths are relative to the crate's asset root; a leading `/` is optional.
Registering a path again replaces its content. Asset loaders that already
cached the crate see the change after
`IAssetLoader::invalidate_assembly_cache`.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/platform/internal/asset_registry.rs#L56)

## Availability

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