#ffi #closure #c #libffi

sys libffi-sys

Raw Rust bindings for libffi

21 releases

0.6.2 Aug 21, 2018
0.6.1 May 30, 2018
0.6.0 Nov 13, 2017
0.5.3 Jul 7, 2017
0.4.4 Jun 21, 2016

#94 in Rust patterns

Download history 24/week @ 2018-07-09 47/week @ 2018-07-16 23/week @ 2018-07-23 46/week @ 2018-07-30 113/week @ 2018-08-06 47/week @ 2018-08-13 7/week @ 2018-08-20 49/week @ 2018-08-27 38/week @ 2018-09-03 52/week @ 2018-09-10 19/week @ 2018-09-17 58/week @ 2018-09-24 94/week @ 2018-10-01

328 downloads per month
Used in 4 crates (2 directly)

MIT/Apache

1.5MB
42K SLoC

C 24K SLoC // 0.2% comments Assembly 17K 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

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.6.3"

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.20 and later.

Dependencies

~1.5MB
~28K SLoC

  • links ffi