[Cuis-dev] Threaded VM FFI usage

Felipe Zak felipe.zak at gmail.com
Thu Feb 19 14:43:54 PST 2026


On Feb 18, Lorenz wrote:

> As I was building some FFI code for libcurl...

We have developed a libcurl package for Cuis Smalltalk implemented entirely
via FFI.

The package provides support for the easy, multi, and share APIs, including
callback handling. We have also written a set of tests and usage examples
to exercise the functionality and validate the bindings.

The package is not yet published, but we are in the process of preparing it
for release.

> Has anyone succeeded with the non-blocking FFI in Cuis yet...

Yes, we have been using Cuis on the threaded-FFI OpenSmalltalk VM on
Windows, macOS, and Linux.

I am attaching a package containing test cases that exercise ODBC FFI calls
and illustrate the different behavior between the standard VM and the
threaded-FFI VM.

Please take a look at the VmTest class.

In particular, you will see that we included a method that animates a morph
by changing its colors. This allows us to visually verify that the main UI
thread is not blocked while the FFI call is running.

The NonThreadedFFIvmTest and ThreadedFFIvmTest classes provide automated
test variants for both VM configurations. Each test is designed to succeed
in one VM flavor and fail (or block) in the other, making the behavioral
differences explicit.

Felipe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20260219/12eb6b25/attachment.htm>


More information about the Cuis-dev mailing list