library(ffi) now available #1752
aarroyoc
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to announce that
library(ffi)
is now available on the master branch of Scryer Prolog. The purpose of this library is be able to call native code via a C ABI. Note that FFI is just one way to communicate with the outside world in Scryer Prolog: sockets, files, pipes or the HTTP libraries are also good options depending on the task and they're safer. This library is based on libffiThe library contains two predicates:
use_foreign_module/2
andforeign_struct/2
. You can find more information about how to use them in its documentation page.There's a repo with experimental Raylib bindings that can be used to quickly test the functionality of
library(ffi)
. The samples require a compiled Raylib shared library and a change may be needed to load the specific library for your system.Here are some samples of FFI in action under Arch Linux and Windows 10:
Beta Was this translation helpful? Give feedback.
All reactions