#### Beyond Linux® From Scratch (System V Edition) - Version 12.3

### Chapter 13. Programming

- Prev

  cargo-c-0.10.11

- Next

  Clisp-2.49

- Up
- Home

# Cbindgen-0.28.0

## Introduction to Cbindgen

Cbindgen can be used to generate C bindings for Rust code.

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

### Package Information

- Download (HTTP): https://github.com/mozilla/cbindgen/archive/v0.28.0/cbindgen-0.28.0.tar.gz

- Download MD5 sum: 0712d991fc8e65121924265d738db71d

- Download size: 232 KB

- Estimated disk space required: 121 MB (add 600 MB for tests)

- Estimated build time: 0.5 SBU (add 0.4 SBU for tests), both on a 4-core machine

### cbindgen Dependencies

#### Required

rustc-1.85.0

### Note

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

## Installation of cbindgen

Install cbindgen by running the following commands:

    cargo build --release

To test the results, issue: cargo test --release. Three tests in `profile.rs` are known to fail because they expect some Rust unstable features disabled in the BLFS rustc-1.85.0 configuration.

Now, as the `root` user:

    install -Dm755 target/release/cbindgen /usr/bin/

## Contents

Installed Program: cbindgen
Installed Library: none
Installed Directory: none

### Short Descriptions

cbindgen | generates C bindings for Rust code

- Prev

  cargo-c-0.10.11

- Next

  Clisp-2.49

- Up
- Home