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

### Chapter 13. Programming

- Prev

  Autoconf2.13

- Next

  Clisp-2.49

- Up
- Home

# Cbindgen-0.20.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-11.1 platform.

### Package Information

- Download (HTTP): https://github.com/eqrion/cbindgen/archive/v0.20.0/cbindgen-0.20.0.tar.gz

- Download MD5 sum: 19e6e9bc319f689ef433eb59090e3f3c

- Download size: 192 KB

- Estimated disk space required: 124 MB (add 568 MB for tests)

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

### cbindgen Dependencies

#### Required

rustc-1.58.1

User Notes: https://wiki.linuxfromscratch.org/blfs/wiki/cbindgen

## Installation of cbindgen

### Note

As with most Rust packages, this needs a network connection to check the current versions of the required cargo crates, and to download them if they are not already present.

Install cbindgen by running the following commands:

    cargo build --release

To test the results, issue: cargo test. Three tests in the final suite are known to fail.

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

Last updated on

- Prev

  Autoconf2.13

- Next

  Clisp-2.49

- Up
- Home