# `Plushie.WidgetRegistry`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.6.0/lib/plushie/widget_registry.ex#L1)

Discovers widgets via `Plushie.Widget` protocol consolidation.

All modules implementing the `Plushie.Widget` protocol are widgets.
Native widgets (those with Rust crates) additionally export `native_crate/0`.

Results are cached in `:persistent_term` after first access. Call
`invalidate/0` to clear the cache (used by the dev server after
protocol reconsolidation).

# `all_widgets`

```elixir
@spec all_widgets() :: [module()]
```

Returns all modules implementing the Plushie.Widget protocol.

# `invalidate`

```elixir
@spec invalidate() :: :ok
```

Clears the cached widget list. Called by DevServer after reconsolidation.

# `native_widgets`

```elixir
@spec native_widgets() :: [module()]
```

Returns widget modules that have a native Rust crate.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
