There's a lower level API that might make updates/"mismatched versions" safer.
At first glance it seems like there are "operations" (and helpers that set up options for the given operation, and helpers to get output from the operation). FFM is still relevant to do this setup but might not need manual bindings for every operation?
There are other improvements to get inspiration from in the C++ bindings:
Is it ever desirable to expose a MemorySegment to an API user? Or should return types get wrapped somehow. For example, the first-party C++ bindings define VImage for doing these operations.
Avoid exposing any pointer shenanigans by returning these wrapped objects, instead of something approximating ** out?
Discussion here: https://github.com/libvips/libvips/discussions/4112
There's a lower level API that might make updates/"mismatched versions" safer.
At first glance it seems like there are "operations" (and helpers that set up options for the given operation, and helpers to get output from the operation). FFM is still relevant to do this setup but might not need manual bindings for every operation?
There are other improvements to get inspiration from in the C++ bindings:
MemorySegment
to an API user? Or should return types get wrapped somehow. For example, the first-party C++ bindings defineVImage
for doing these operations.** out
?Some reading:
VImage
wrapper: https://github.com/libvips/libvips/blob/master/cplusplus/VImage.cpp