[squeak-dev] FFI | How to declare pointer to external structure in #fields?

Ben Coman btc at openinworld.com
Tue May 19 14:53:17 UTC 2020


On Tue, 19 May 2020 at 03:33, Levente Uzonyi <leves at caesar.elte.hu> wrote:

> How does UFFI come here? AFAIK it's nothing but a different image-side
> code using the VM's FFI implementation along with the signature notion
> Igor used in NativeBoost (which is great btw because it's "as you would
> write it in C" and doesn't require language changes).
>

Think of UFFI as a front-end for original-FFI.  IIUC although Igor's
NativeBoost was a super fast alternative FFI,
it wasn't portable and wasn't compatible with Spur, so Pharo had to throw
NativeBoost away.
But they kept the nice signature style as a layer over FFI.

Ronie wrote a paper on the reasons for UFFI in Pharo...
https://users.dcc.uchile.cl/~rsalgado/uffi-fourth-draft.pdf

Here is a shorter presentation...
http://www.esug.org/data/ESUG2016/05-Friday/1145-1230%20UnifiedFFI/ESUG2016%20-%20UFFI.pdf


Here are some usage references...
https://www.slideshare.net/FASTPresentations/pharo-foreign-function-interface-ffi-by-example-by-esteban-lorenzano

http://books.pharo.org/booklet-uffi/pdf/2020-02-12-uFFI-V1.0.1

I never used FFI before UFFI, but I find UFFI very friendly to use.

I believe Ronie's Lowcode was designed to be another backend for UFFI, but
I don't know the status of state.

cheers -ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200519/a75a12b3/attachment.html>


More information about the Squeak-dev mailing list