Foreign Function Interface (FFI): Never Need to Write XS Again
By Graham Ollis (plicease) from DC.pm
Date: Monday, 23 June 2014 15:00
Duration: 50 minutes
Target audience: Intermediate
Language: English
Tags: alien ffi infrastructure libarchive
You can find more information on the speaker's site:
- Talk: https://docs.google.com/presentation/d/1NY3ROAiSAC5yk1LoeBCM5JfAmSeTdopgYFnJO6mUtXI/edit?usp=sharing
Foreign Function Interface (FFI) is a popular method of implementing extensions that rely on C libraries in languages such as Ruby, Python and Java. FFI has not hit the big time in Perl, but it has some advantages over Perl’s historical extension language XS. Migrating parts of CPAN from XS to FFI may ease the transition to alternative Perl implementations or Perl 6. In this talk I will compare and contrast the two techniques in the context of Perl today, using as an example the work that I did implementing FFI bindings for libarchive with FFI::Raw (Archive::Libarchive::FFI). I will focus on work I did creating and using infrastructure that should be applicable to many FFI projects. I will also discuss the development of the Alien::Libarchive module to make available libarchive to the FFI bindings that I wrote. I will make suggestions as to how Alien infrastructure could be improved to better work with FFI projects.
Attended by:- Leon Timmermans (leont)
- Arthur Schmidt (fREW)
- Timm Murray
- Dave Rolsky (autarch)
- Matthew Horsfall (alh)
- Graham Ollis (plicease)
- Steve Nolte (mcsnolte)
- Dmitri Tikhonov (dmitri)
- Matt Phillips (mattp)
- Jonathan Taylor
- Yanick Champoux (Yanick)
- Thomas Glase
- Dana Jacobsen (danaj)
- Bradley Andersen (elohmrow)
- Russel Fisher (Fish)
- Henry Van Styn (vanstyn)
- John Lightsey (J.D.)
- Joshua Goodman
- Cora Davis
- Rish
- Joe Zhou
- James Carman (Jeremy)
- ali roozitalab
- Nikolay Martynov
- Rich Harkins
- Irina Todeva
- Jesse Luehrs (doy)
- Turd Furgison (fartfart)
- Todd Rinaldo
- Gabriel Munoz (gabriel)
- Nova Patch (patch)
- atoomic
- Bruce Gray (Util)
- Jon Day
- Stan Schwertly (stan_theman)
- Tim Bunce
- Christopher Butler
- Doug Hoyte (fractal)
- Brian Brandes
- Richard Farr
- Erik Johansen (uniejo)
- Kenneth Smith
- NdFeB
- jerry gay (particle)
- Chip Salzenberg (Chip)
- Walt Mankowski (waltman)
- Christopher Eades (Chro)
- Rikus Goodell
- Aran Deltac (bluefeet)
- brian carlson
- Christopher Stith (mr_mischief)
- Katherine Kirby (Kate)
- Larry Leszczynski (larryl)
- David Hand (Ptolemarch)
- AndyB
- Deven Corzine (deven)
- Kevin Olson
- (Samuel) Kurt Newman
- Dan Muey
- Jeffrey Tomsak (Jeff)