LuaJIT Question On Mac OS X - FFI Library

If I’m using Mac OS X do I have access to this FFI library? http://luajit.org/ext_ffi.html

I’m trying to use this Simplex Noise script (http://webstaff.itn.liu.se/~stegu/simplexnoise/Noise.lua) but it says it’s missing ffi.lua.

Is it possible for me to use the FFI Library on Mac OS X and if so how do I go about doing that?

Thank you for the help!

ffi, bit and math are all loaded to the global table by default. There’s no need to require them as Noise.lua does. Remove those three lines.

PS While FFI is available I think it’s better and more in line with how Defold works to use a native extension. Also, FFI is not available in HTML5 builds.

1 Like

Sounds good. Thanks! Any recommendations on extensions that have noise functions or is there a way I can search for them? Thanks again.

Assets are usually found in the Asset Portal.