Alien-YARA
view release on metacpan or search on metacpan
lib/Alien/YARA.pm view on Meta::CPAN
));
In your Perl module code:
use Alien::YARA;
use FFI::Platypus;
my $ffi = FFI::Platypus->new( api => 2 );
$ffi->lib( Alien::YARA->dynamic_libs );
# Now attach your C functions
$ffi->attach( 'yr_initialize' => [] => 'int' );
=head1 DESCRIPTION
This module acts as an encapsulation layer for the YARA C library (C<libyara>).
It checks your host system to see if YARA is already installed via native package
management (like C<apt>, C<homebrew>, or C<pkgconf>). If it cannot find a suitable
global version, it automatically downloads the official YARA source code,
compiles it, and isolates the binaries locally within your Perl library tree.
This makes bundling dependencies for FFI-based modules like L<YaraFFI> perfectly
( run in 0.477 second using v1.01-cache-2.11-cpan-e1769b4cff6 )