Skip to main content

hyperdb_bootstrap/
lib.rs

1// Copyright (c) 2026, Salesforce, Inc. All rights reserved.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4//! Download and install the `hyperd` executable from Tableau's Hyper Java
5//! API release packages. (The Java bundle is used rather than the C++ one
6//! because the C++ `macos-arm64` zip ships an x86_64 `hyperd`; see the
7//! `url` module for the full rationale.)
8//!
9//! The crate ships both a CLI binary (`hyperd-bootstrap`) and a small
10//! library. The library is blocking (no async runtime required) and has
11//! no dependency on `tokio`, so it can be called from build scripts,
12//! `postinstall` hooks, or any sync Rust code.
13//!
14//! # Quick start
15//!
16//! ```no_run
17//! use hyperdb_bootstrap::{install, InstallOptions};
18//!
19//! let installed = install(InstallOptions::default()).unwrap();
20//! println!("hyperd is at {}", installed.binary_path.display());
21//! ```
22//!
23//! See [`InstallOptions`] and [`VersionSource`] for how to override the
24//! destination, pin a specific release, load metadata from an external
25//! TOML file, or scrape the latest release from the public releases page.
26
27/// HTTP (via `curl`) download of release archives + SHA-256 verification.
28pub mod download;
29/// Error types returned by the crate.
30pub mod error;
31/// ZIP archive extraction of the `hyperd` binary and its shared libraries.
32pub mod extract;
33/// High-level `install` entry point and its configuration types.
34pub mod install;
35/// Supported host platforms (macOS arm64/x86_64, Linux x86_64, Windows x86_64).
36pub mod platform;
37/// Pinned-release metadata loaded from `hyperd-version.toml`.
38pub mod release;
39/// Best-effort scraping of the public releases page to discover the latest
40/// version when no pin is supplied.
41pub mod scrape;
42/// URL construction for Tableau's public download endpoint.
43pub mod url;
44/// Reachability probes that HEAD each platform URL of a pinned release.
45pub mod verify;
46
47pub use error::Error;
48pub use install::{install, InstallOptions, InstalledHyperd, VersionSource, DEFAULT_DEST_ROOT};
49pub use platform::Platform;
50pub use release::PinnedRelease;
51pub use verify::{verify_release, VerifyOutcome};