1# Command Line Usage 2 3Install the `bindgen` executable with `cargo`: 4 5```bash 6$ cargo install bindgen-cli 7``` 8 9The `bindgen` executable is installed to `~/.cargo/bin`. You have to add that 10directory to your `$PATH` to use `bindgen`. 11 12`bindgen` takes the path to an input C or C++ header file, and optionally an 13output file path for the generated bindings. If the output file path is not 14supplied, the bindings are printed to `stdout`. 15 16If we wanted to generated Rust FFI bindings from a C header named `input.h` and 17put them in the `bindings.rs` file, we would invoke `bindgen` like this: 18 19```bash 20$ bindgen input.h -o bindings.rs 21``` 22 23For more details, pass the `--help` flag: 24 25```bash 26$ bindgen --help 27``` 28