rust-bindgen-0.72.1

#### Beyond Linux® From Scratch (systemd Edition) - Version 13.0

### Chapter 13. Programming

- Prev

  Rustc-1.93.1

- Next

  SCons-4.10.1

- Up
- Home

# rust-bindgen-0.72.1

## Introduction to rust-bindgen

The rust-bindgen package contains a utility that generates Rust bindings from C/C++ headers.

### Note

This package is known to build and work properly using an LFS 13.0 platform.

### Package Information

- Download (HTTP): https://github.com/rust-lang/rust-bindgen/archive/refs/tags/v0.72.1/rust-bindgen-0.72.1.tar.gz

- Download MD5 sum: 49be3303557d072ce4c6987b2989be3c

- Download size: 2.2 MB

- Estimated disk space required: 219 MB

- Estimated build time: 0.4 SBU (with parallelism=8)

### rust-bindgen Dependencies

#### Required

rustc-1.93.1 and LLVM-21.1.8 (with Clang, runtime)

### Note

An Internet connection is needed for building this package. The system certificate store may need to be set up with make-ca-1.16.1 before building this package.

## Installation of rust-bindgen

Install rust-bindgen by running the following commands:

    cargo build --release

To test the results, issue: cargo test --release. Two tests, `header_issue_544_stylo_creduce_2_hpp` and `header_nsbasehashtable_hpp`, are known to fail.

Now, as the `root` user:

    install -v -m755 target/release/bindgen /usr/bin

Still as the `root` user, install the Bash and Zsh completion support files:

    bindgen --generate-shell-completions bash \
        > /usr/share/bash-completion/completions/bindgen
    bindgen --generate-shell-completions zsh  \
        > /usr/share/zsh/site-functions/_bindgen

## Contents

Installed Programs: bindgen
Installed Libraries: None
Installed Directories: None

### Short Descriptions

bindgen | generates bindings for Rust from C/C++ headers

- Prev

  Rustc-1.93.1

- Next

  SCons-4.10.1

- Up
- Home