Merge pull request #12 from lucis-fluxum/patch-1

Use handy LIBSUFFIX from ffi
This commit is contained in:
Alex Crichton
2017-07-07 08:57:23 -05:00
committed by GitHub

View File

@@ -1,14 +1,8 @@
require 'ffi'
if RUBY_PLATFORM.include?('darwin')
EXT = 'dylib'
else
EXT = 'so'
end
module Hello
extend FFI::Library
ffi_lib 'target/debug/libdouble_input.' + EXT
ffi_lib 'target/debug/libdouble_input.' + FFI::Platform::LIBSUFFIX
attach_function :double_input, [ :int ], :int
end