Resolves the path to the plushie binary.
Resolution order for path!/0:
PLUSHIE_BINARY_PATHenvironment variable- Application config
:binary_path - Custom widget build in
_build/<env>/plushie/target/ - 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.
Summary
Functions
Returns the plushie-renderer version this SDK targets.
Returns the binary name for custom widget builds.
Returns the directory where downloaded binaries are stored.
Returns the platform-specific binary name for downloads.
Standard instructions for resolving a missing plushie binary.
Returns the path to the plushie binary.
Validates that the binary at path matches the system architecture.
Functions
@spec binary_version() :: String.t()
Returns the plushie-renderer version this SDK targets.
@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.
@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).
@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).
@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.
@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.
@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).