zaparoo-update 0.1.2

Facade crate for the Zaparoo update UI/runtime integration
Documentation
// Copyright José Manuel Barroso Galindo <theypsilon@gmail.com>
// SPDX-License-Identifier: PolyForm-Noncommercial-1.0.0

#[cfg(all(
    target_os = "linux",
    target_arch = "arm",
    target_env = "gnu",
    target_abi = "eabihf"
))]
use zaparoo_update_runtime_linux_armv7 as zaparoo_update_runtime;
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
use zaparoo_update_runtime_linux_x86_64 as zaparoo_update_runtime;
#[cfg(all(target_os = "windows", target_arch = "x86_64"))]
use zaparoo_update_runtime_windows_x86_64 as zaparoo_update_runtime;

#[must_use]
pub fn runtime_artifact_root() -> Option<std::path::PathBuf> {
    Some(zaparoo_update_runtime::artifact_root())
}

/// Returns whether the updater script is available on this device.
///
/// This intentionally checks the real updater tool, not `PLAY_EVENTS` playback.
/// The platform-specific resolver lives in the selected runtime crate.
#[must_use]
pub fn is_updater_available() -> bool {
    zaparoo_update_runtime::is_updater_available()
}

pub fn init_runtime(_handle: tokio::runtime::Handle) {
    // Binary runtime artifacts own their private async runtime. This facade
    // keeps the historical host API so existing frontends do not need changes.
}