Manages the Rust dispenser template and compilation.
Handles copying the template, injecting the compressed payload, and invoking Cargo to build the final binary.
- Linux: x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu
- Linux musl: x86_64-unknown-linux-musl, aarch64-unknown-linux-musl
- macOS: x86_64-apple-darwin, aarch64-apple-darwin
- Windows: x86_64-pc-windows-msvc (coming soon)
Summary
Functions
Injects the payload into the Rust template and builds the binary.
Initializes a temporary directory with the Rust dispenser template.
Functions
@spec build(Path.t(), String.t(), String.t(), keyword(), :release | :escript) :: :ok | {:error, String.t()}
Injects the payload into the Rust template and builds the binary.
payload_path- Path to the compressed payload tarballbinary_name- Name for the final executabletarget_triple- Rust target triple (e.g., "x86_64-unknown-linux-musl")config- Mix project configurationformat- Output format (:releaseor:escript):ok- Success{:error, reason}- Failure
@spec initialize_dispenser(Path.t()) :: :ok | {:error, File.posix()}
Initializes a temporary directory with the Rust dispenser template.