#ffi #closure #c #libffi

sys libffi-sys

Raw Rust bindings for libffi

23 releases

0.6.4 Apr 10, 2019
0.6.3 Oct 29, 2018
0.6.2 Aug 21, 2018
0.6.1 May 30, 2018
0.4.4 Jun 21, 2016

#94 in Rust patterns

Download history 24/week @ 2018-12-27 52/week @ 2019-01-03 51/week @ 2019-01-10 265/week @ 2019-01-17 22/week @ 2019-01-24 36/week @ 2019-01-31 10/week @ 2019-02-07 57/week @ 2019-02-14 33/week @ 2019-02-21 55/week @ 2019-02-28 22/week @ 2019-03-07 36/week @ 2019-03-14 122/week @ 2019-03-21 43/week @ 2019-03-28 54/week @ 2019-04-04

261 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

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

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

~1.5MB
~31K SLoC

  • links ffi