plushie/binary
Resolve the path to the plushie Rust binary.
Resolution order:
- PLUSHIE_BINARY_PATH env var (error if set but file missing)
- priv/bin/plushie (installed by
gleam run -m plushie/downloadorgleam run -m plushie/build) - Precompiled at priv/bin/{platform}-{arch}/plushie
- Custom build at _build/{env}/plushie/target/release/plushie
- Common local paths (./plushie, ../plushie/target/release/plushie)
Returns Result(String, BinaryError) with the path on success.
Types
Error when the plushie binary cannot be found.
pub type BinaryError {
NotFound(searched: List(String))
EnvVarPointsToMissing(path: String)
}
Constructors
-
NotFound(searched: List(String))Binary not found at any searched path.
-
EnvVarPointsToMissing(path: String)PLUSHIE_BINARY_PATH is set but the file doesn’t exist.
Values
pub fn error_to_string(err: BinaryError) -> String
Format a binary error as a human-readable string.
pub fn find() -> Result(String, BinaryError)
Find the plushie binary, searching in priority order.