diff --git a/ruby-to-rust/src/main.rb b/ruby-to-rust/src/main.rb index 146de37..0c0d7c8 100644 --- a/ruby-to-rust/src/main.rb +++ b/ruby-to-rust/src/main.rb @@ -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