3 unstable releases

0.2.1 Dec 6, 2022
0.2.0 Feb 27, 2022
0.1.0 Feb 13, 2022

#855 in Command line utilities

Download history 123/week @ 2022-12-06 193/week @ 2022-12-13 67/week @ 2022-12-20 49/week @ 2022-12-27 56/week @ 2023-01-03 125/week @ 2023-01-10 66/week @ 2023-01-17 193/week @ 2023-01-24 246/week @ 2023-01-31 214/week @ 2023-02-07 219/week @ 2023-02-14 265/week @ 2023-02-21 153/week @ 2023-02-28 87/week @ 2023-03-07 97/week @ 2023-03-14 92/week @ 2023-03-21

472 downloads per month

MIT license

21KB
472 lines

chmap

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.

How to Get

Requirements

You need a Rust toolchain, see rustup.

Cargo

  1. Clone the repository
  2. If you want to run via cargo, use cargo run -- arguments
  3. If you want to install, cargo install --path chmap

cheadermap Crate

If you would like to use the cheadermap library crate, add the following to your Cargo.toml:

[dependencies]
cheadermap = "0.2.0"

How to Use

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.

Development

Visual Studio Code coupled with the rust-analyzer and CodeLLDB provide a good IDE experience.

rustfmt & clippy

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

Testing

From the repo root, execute:

cargo test

Dependencies

~0.7–1.2MB
~28K SLoC