[Vm-dev] Slang & FFI

Eliot Miranda eliot.miranda at gmail.com
Mon Aug 24 21:06:23 UTC 2015

Hi Ben,

On Mon, Aug 24, 2015 at 6:20 AM, Ben Coman <btc at openinworld.com> wrote:

> Just had a curious thought I could not find the answer from poking
> around...
> Is Slang able to make use of the FFI interface?  I see things like
> file primitives with C-code scaffolding around system calls, and
> wonder if this C-code could be reduced by Slang calling directly to
> system functions through FFI, with scaffolding written in Slang?
> Does that make any sense?

Yes it makes sense but it isn't a benefit. You're saying that the FFI can
provide the marshalling that is written manually in plugins.  But given
that the plugins are already written it doesn't really get us anything.
You'd have to introduce a specification language between the plugin's
primitive interface and given C calls that Slang would translate into
suitable marshalling code to cut out the human author.  Seems to me that's
a lot of effort to auto-generate a small amount of code.  I think more
interesting is writing direct to the FFI.

But people have discussed taking a functional interface written w.r.t. the
FFI and autogenerating a plugin for it, to provide the security and
encapsulation benefits.  Thing is, would it be part of Slang or part of the
FFI?  Perhaps it could use elements of both.  But I'm not sure there's
enough use cases to justify the effort.

best, Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20150824/334bdd59/attachment.htm

More information about the Vm-dev mailing list