Bend icon indicating copy to clipboard operation
Bend copied to clipboard

Request: FFI and interfaces with other languages

Open ArminMousavi opened this issue 1 year ago • 4 comments

Does it have any libraries or support libraries from other languages ( Rust, Python etc ...) ? How can we make a webserver with it ?

ArminMousavi avatar May 17 '24 22:05 ArminMousavi

Not yet, it currently only runs pure computations. We will add IO very soon, and give you the option to call arbitrary C functions via FFI. Running a full webserver will be involved though, but this is the path

VictorTaelin avatar May 18 '24 01:05 VictorTaelin

I would like to see a linear algebra library

anandijain avatar May 18 '24 02:05 anandijain

All you have to support is dlopen() and system() ? Then you can call arbitrary code. A FFI that can pass a cacheline is probably the sweet spot for CPU static linking.

chadbrewbaker avatar May 19 '24 04:05 chadbrewbaker

All you have to support is dlopen() and system() ? Then you can call arbitrary code. A FFI that can pass a cacheline is probably the sweet spot for CPU static linking.

We just added support to loading libraries with dlopen and calling the functions in there. You still need to write your wrappers in C. In the future we'll also probably add something like python's ctypes for writing wrappers in bend.

developedby avatar Jul 22 '24 18:07 developedby