3 ms·
That's not exactly an FFI, that's an extension since you're coding against ArkScript's C++ API. An FFI is when you use only ArkScript to make calls against othe
by eatonphil 7y ago
That's not exactly an FFI, that's an extension since you're coding against ArkScript's C++ API. An FFI is when you use only ArkScript to make calls against other languages that don't know about ArkScript's API.
- saagarjha 7y agoThe wiki (https://github.com/ArkScript-lang/Ark/wiki/Embedding#creating-plugins https://github.com/ArkScript-lang/Ark/wiki/Embedding#creatin...) calls them “plugins” and they’re also called “modules”, which I think is a lot clearer than “FFI”. Essentially it’s a bunch of native functions that are exported with C linkage and compiled into a set of shared libraries, which are then loaded and the functions in them looked up at runtime. On the other (C++) side it’s similar to e.g. a JNI binding or any other language where you can pull values out of the runtime.
- jackrabbit_ 7y ago> An FFI is when you use only ArkScript to make calls against other languages that don't know about ArkScript's API I should definitly rename this part as stated in another comment, since the "FFI" isn't a real one, I messed up with the vocabulary