Hi, we are working on the tools required to have embedded Pharo in different solutions.
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. A simple start point begins with exposing callbacks from the image. This will only work with the new Queue based callbacks, as the image will receive callbacks from outside a call-out. I have started with a POC of this, but time / resources is the limitant. I will try to put some time on it, but we have other priorities. Cheers, On Wed, Jan 22, 2020 at 9:38 AM Pierce Ng <pie...@samadhiweb.com> wrote: > > On Tue, Jan 21, 2020 at 08:20:48PM +0100, Roland Plüss via Pharo-users wrote: > > The first mode is the "runtime mode". This would be the mode used for > > the released products and does not allow to "directly modify" the image. > > This mode would only require basic set of classes (frameworks) since the > > game engine provides a large set of functionality in the module layer so > > the script layer provides the logic, UI and things like that. This image > > would not require to be enriched with a lot of things. > > This is doable currently. The Pharo image is embedded into the > executable and used in read-only mode. Although personally I'd implement > as much of the app logic in Pharo as possible simply because of the high > productivity. > > > The second mode is the "development mode". For this one I thought about > > exposing a Pharo VM image acting as the Coding and Debugging IDE. Here I > > would opt to expose the full power of Pharo/Smalltalk to the developer. > > I envisage doing this via some kind of data exchange between the host > program and Pharo, which seems doable for both the embedded and 'over the > wire' development cases. > > Pablo recently published an example of embedding a headless-but-GUI > Pharo image inside a C program via the Windows resource mechanism. As it > happens, I have just implemented the same example that works on Linux > and MacOS from one source code. Didn't test on Windows, but I'm sure > it'll work there too. In a day or two I will publish the code and blog > post. > > Attached teaser screenshot. :-) > > Pierce > -- Pablo Tesone. teso...@gmail.com