FFI Build Status

Perl Foreign Function Interface based on GNU ffcall

SYNOPSIS

use FFI;
$addr = <address of a C function>
$signature = <function signature>
$ret = FFI::call($addr, $signature, ...);
 
$cb = FFI::callback($signature, sub {...});
$ret = FFI::call($addr, $signature, $cb->addr, ...);

DESCRIPTION

If you are interested in FFI and Perl you should probably consider newer projects, such as FFI::Platypus instead. They have more features, are usually faster and are actively maintained.

The original README follows.

The FFI and FFI::Library modules implement a foreign function interface for Perl. The foreign function interface allows Perl code to directly call C functions exported from shared libraries (DLLs on Windows, .so files on Unix). It also allows a Perl subroutine to be packaged as a function which can be passed to an external C routine ("callbacks").

There are two modules in the package:

See the file INSTALL for installation details.