# `Plushie.Binary`
[🔗](https://github.com/plushie-ui/plushie-elixir/blob/v0.7.2/lib/plushie/binary.ex#L1)

Resolves the path to the plushie binary.

Resolution order for `path!/0`:

1. `PLUSHIE_BINARY_PATH` environment variable
2. Application config `:binary_path`
3. Custom widget build under
   `_build/<env>/plushie-renderer-spec/target/plushie-renderer/target/`
4. Downloaded binary in `_build/plushie/bin/`

Steps 1 and 2 are explicit configuration. If set but pointing to a
missing file, they raise immediately rather than falling through. Steps
3 and 4 are implicit discovery and silently try the next option.

# `build_name`

```elixir
@spec build_name() :: String.t()
```

Returns the binary name for custom widget builds.

Derived from the Mix project app name by default, overridable via config:

    config :plushie, :build_name, "my-custom-renderer"

For a project named `:my_dashboard`, the default is `my-dashboard-renderer`.

# `download_dir`

```elixir
@spec download_dir() :: String.t()
```

Returns the directory where downloaded binaries are stored.

This is `_build/plushie/bin/` relative to the project root, shared
across Mix environments (the binary is platform-specific, not
env-specific).

# `download_name`

```elixir
@spec download_name() :: String.t()
```

Returns the platform-specific binary name for downloads.

Format: `plushie-renderer-{os}-{arch}` (e.g. `plushie-renderer-linux-x86_64`).

# `not_found_message`

```elixir
@spec not_found_message() :: String.t()
```

Standard instructions for resolving a missing plushie binary.

Used by the compiler, test helper, and error messages to provide
consistent guidance.

# `path!`

```elixir
@spec path!() :: String.t()
```

Returns the path to the plushie binary.

Raises with `not_found_message/0` if no binary can be resolved, or
with a specific message if an explicitly configured path doesn't exist.

# `plushie_rust_version`

```elixir
@spec plushie_rust_version() :: String.t()
```

Returns the plushie-rust release this SDK targets.

# `validate_architecture!`

```elixir
@spec validate_architecture!(path :: String.t()) :: :ok
```

Validates that the binary at `path` matches the system architecture.

Runs `file` on the binary and compares the detected architecture against
`:erlang.system_info(:system_architecture)`. Raises on mismatch. Returns
`:ok` on match or if the check cannot be performed (e.g. `file` command
not available, or architecture not recognized).

---

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