dear-imgui-build-support
Build helper utilities shared by dear-imgui-sys
and its extensions.
This crate is intended for use in build scripts (build.rs
) and internal packaging tools.
It centralizes common logic around naming prebuilt archives, generating manifests, and
downloading/extracting prebuilt static libraries.
Features
- Compose archive names in a consistent scheme:
<crate>-prebuilt-<version>-<target>-<link>[<extra>][-<crt>].tar.gz
- Compose a
manifest.txt
describing the prebuilt contents (version, target, link type, CRT, features) - Download
.tar.gz
archives (blocking reqwest + rustls) and extract to a cache - Utility helpers to build candidate GitHub release URLs
API Sketch
use ;
let name = compose_archive_name;
let manifest = compose_manifest_bytes;
let cache_root = prebuilt_cache_root_from_env_or_target;
let lib_name = expected_lib_name;
let lib_dir = download_prebuilt?;
Blocking HTTP and TLS
This crate enables reqwest
with the blocking
and rustls-tls
features. Build scripts use
blocking I/O to download prebuilt archives when requested by environment variables or features.
When to Use
- In
build.rs
ofdear-imgui-sys
and extension-sys
crates to handle optional prebuilt flows. - In internal packaging tools (e.g.,
bin/package
) to ensure archive names and manifests are consistent.
Docs.rs / Offline Builds
This crate is not required for docs.rs. For crates that generate bindings at build time, consider
checking in src/bindings_pregenerated.rs
and copying/sanitizing it in build.rs
during docs.rs builds.
License
Dual-licensed under MIT or Apache-2.0.