develooper Front page | perl.bootstrap | Postings from July 2000

External API's: XS, Pickle, Win32::API, FFI, C::DynaLib etc.

Thread Next
From:
Garrett Goebel
Date:
July 31, 2000 11:20
Subject:
External API's: XS, Pickle, Win32::API, FFI, C::DynaLib etc.
Message ID:
71BEC0D4E1DED3118F7A009027B1202835C806@EXCH_MISSION
It'd be good to see a nice cross-platform mechanism to perform foreign
function calls from shared libaries... that didn't consist of writing lots
of C code or mystic XS macros.

- XS is hard to learn and unapproachable to most Perl programmers
  with little C coding experience.
- Pickle looks like a better XS. But I don't know much about it
- Win32::API is Win32 only, makes some big assumptions, over
  simplifies types, lacks support for callbacks, etc.
- C::DynaLib is *NIX only (Win32 support recently dropped)
- FFI.pm is nice, but not yet ready for primetime (issues with
  changes in DynaLoader between 5.005.03 and 5.6.0 resulting in
  not being able to find/load the appropriate library). FFI.pm
  requires the gnu ffcall with its viral GPL license... FFI
  includes a LGPL wrapper, but GPL is GPL is GPL is a problem.

There's an awful lot of Win32 modules that depend on Win32::API to
dynamically call functions from Win32 API *.dll's. There is pretty good
evidence that there are Perl programmers out there that what to dynamically
call C functions from libraries without writing XS glue code or requiring a
C compiler. 

Is there any good writeup on why anyone should prefer XS glue over something
like Win32::API, C::DynaLib, or FFI.pm?

Garrett

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About