On Wed, Jan 22, 2020 at 10:09:33AM +0100, tesonep@gmail.com wrote:
Hi, we are working on the tools required to have embedded Pharo in different solutions.
Hi Pablo, Your published example embed the image as a Windows resource. Well, the excellent and, like Smalltalk, vastly underrated Free Pascal has built-in cross platform support for Windows resources. Basically I have implemented in Pascal the simplest FFI to libPharoVMCore and the embedded image access routines for callback by libPharoVMCore, together with a driver program which is pretty much a straight port of your C program. Pascal also produces static and dynamic libraries. My embedded image access code can be packaged as such, which makes it accessible from other languages.
My idea is to implement an API to communicate to the image, I was thinking more in an API similar to Objective-C Bridge or COM objects. Still I am not sure how to design the API or the way to integrate it. Today, I am thinking about not having to much marsharlling of Pharo Objects to external objects, I am thinking to use a similar strategy like the used with FFI.
I am more thinking about marshaling, using say MessagePack. For 'over the wire' development, maybe MessagePack RPC between headful Pharo and the to-be-host program. For embedded, some means to pass MessagePack structures back and forth. Pierce