chmap
is a command line tool to work with Clang headermaps produced by Xcode. It is written in Rust.
chmap
is the modern, cross-paltform version of the Swift hmap tool.
You need a Rust toolchain, see rustup.
- Clone the repository
- If you want to run via
cargo
, usecargo run -- arguments
- If you want to install,
cargo install --path chmap
If you would like to use the cheadermap library crate, add the following to your Cargo.toml
:
[dependencies]
cheadermap = "0.2.0"
To print the contents of an hmap file, execute:
chmap print /path/to/file.hmap
For example, if you have just cloned the repository, execute cargo run -- print /path/to/file.hmap
.
Visual Studio Code coupled with the rust-analyzer and CodeLLDB provide a good IDE experience.
If you don't have rustfmt
and clippy
, you can install them by executing:
rustup component add rustfmt
rustup component add clippy
Before committing, ensure code is formatted and passes clippy
without any warnings using:
cargo fmt --all
cargo clippy
From the repo root, execute:
cargo test