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