Update examples for Rust master

This commit is contained in:
Alex Crichton
2015-05-19 09:41:22 -07:00
parent aece96458f
commit 640bfb9da8
9 changed files with 26 additions and 19 deletions

View File

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