(vicare ffi) interfaces with the host operating
system and other external libraries exposing a C language interface; it
is suggested to import the FFI library with the prefix
as in the following prelude:
#!r6rs (import (rnrs) (prefix (vicare ffi) ffi::))
The facilities of the
(vicare ffi) give the Scheme program
unrestricted access to the computer memory, allowing one to allocate,
access, modify, and free memory as needed. The facilities also allow
the Scheme program to call out to system procedures as well as
allow the native procedures to call back into Scheme.
(vicare ffi) reexports all the bindings from the
(vicare system $foreign).
The availability of the Libffi API can be tested at run–time with
(see vicare-built-with-ffi-enabled), and at
expand–time with the clause
from SRFI-0 ((vicare-libs)ffi-enabled).
Vicare defines an API to handle pointer objects, iklib pointers for details.
|• ffi libffi:||Installing and using Libffi.|
|• ffi dl:||Accessing shared libraries.|
|• ffi shared:||System-agnostic shared libraries API.|
|• ffi call:||Callouts and callbacks.|
|• ffi foreign wrapper:||Wrapper for foreign pointers.|