#ffi #closure #c #libffi

sys libffi-sys

Raw Rust bindings for libffi

23 releases

0.7.0 May 12, 2019
0.6.3 Oct 29, 2018
0.6.1 May 30, 2018
0.6.0 Nov 13, 2017
0.4.4 Jun 21, 2016

#3 in #closure

Download history 112/week @ 2019-03-24 16/week @ 2019-03-31 78/week @ 2019-04-07 36/week @ 2019-04-14 211/week @ 2019-04-21 200/week @ 2019-04-28 87/week @ 2019-05-05 255/week @ 2019-05-12 157/week @ 2019-05-19 180/week @ 2019-05-26 168/week @ 2019-06-02 180/week @ 2019-06-09 155/week @ 2019-06-16 223/week @ 2019-06-23 160/week @ 2019-06-30

512 downloads per month
Used in 5 crates (3 directly)

MIT/Apache

1.5MB
42K SLoC

C 24K SLoC // 0.2% comments Assembly 17K SLoC // 0.0% comments Automake 313 SLoC // 0.0% comments Shell 216 SLoC // 0.4% comments Python 161 SLoC C++ 128 SLoC // 0.1% comments Rust 127 SLoC // 0.3% comments

libffi-sys-rs: Low-level Rust bindings for libffi

Travis CI build status Appveyor build status Crates.io License: MIT License: Apache 2.0

The C libffi library provides two main facilities: assembling calls to functions dynamically, and creating closures that can be called as ordinary C functions. This is an undocumented wrapper, generated by bindgen, intended as the basis for higher-level bindings, but you can see the C libffi documentation.

If you clone this repository in order to build the library, be sure to do a recursive clone, as we include C libffi as a submodule.

See the libffi crate for a higher-level API.

Usage

Building libffi-sys will build the libffi C library from github, which requires that you have a working make, C compiler, automake, autoconf, and texinfo first. It’s on crates.io, so you can add

[dependencies]
libffi-sys = "0.7.0"

to your Cargo.toml and

extern crate libffi_sys;

to your crate root.

If you clone from github, be sure to clone --recursive to get the C libffi.

This crate supports Rust version 1.30 and later.

Dependencies

~0–1.5MB
~31K SLoC