You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
FFI is one of a way to access native functions, but it's limitations are limited access to the VM and stacks, and you can't create a native Arturo type.
Describe the solution you'd like
The solution to that is to implement a native modularisation. I have something like this in my mind.
Run cc arturo_lib.c -fPIC -shared -larturo -o lib.so
;; `import` accepts `native` attribute to import native modules;; `import.native` will search `lib.dll` in Windows, `lib.so` in Linux, and `lib.dylib` in MacOS on specified search pathslib: import.native "lib"print (lib\foo "foo")
Describe alternatives you've considered
–
Additional context
You can take a look at Lua C API for reference.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
FFI is one of a way to access native functions, but it's limitations are limited access to the VM and stacks, and you can't create a native Arturo type.
Describe the solution you'd like
The solution to that is to implement a native modularisation. I have something like this in my mind.
Run
cc arturo_lib.c -fPIC -shared -larturo -o lib.so
Describe alternatives you've considered
–
Additional context
You can take a look at Lua C API for reference.
The text was updated successfully, but these errors were encountered: