| Crates.io | libchm |
| lib.rs | libchm |
| version | 0.1.0 |
| created_at | 2025-12-13 02:13:56.633303+00 |
| updated_at | 2025-12-13 02:13:56.633303+00 |
| description | Tiny wrapper around ChmLib with safe-ish helpers. |
| homepage | |
| repository | https://github.com/trypsynth/libchm |
| max_upload_size | |
| id | 1982457 |
| size | 25,392 |
Tiny Rust wrapper around libchm for reading CHM archives with safe-ish helpers.
ChmUnitInfo.chmlib during build.rs (downloads chmlib-0.40 from jedrea.com).cargo ad libchm
use libchm::{ChmHandle, CHM_ENUMERATE_ALL, Result, unit_info_path};
fn main() -> Result<()> {
let mut chm = ChmHandle::open("docs.chm")?;
chm.enumerate(CHM_ENUMERATE_ALL, |ui| {
println!("{}", unit_info_path(ui));
true // keep going
})?;
let bytes = chm.read_file("/index.html")?;
println!("index size: {}", bytes.len());
Ok(())
}
chmlib-0.40 automatically (no system install needed).CARGO_NET_OFFLINE or a mirror.MIT for this crate. Upstream chmlib is LGPL-2.0-or-later; ensure compatibility for your use case.