Skip to content

Instantly share code, notes, and snippets.

@mzumi
Created October 30, 2016 12:58
Show Gist options
  • Save mzumi/edadc66a5f6cd5473f8674fcad7b22f5 to your computer and use it in GitHub Desktop.
Save mzumi/edadc66a5f6cd5473f8674fcad7b22f5 to your computer and use it in GitHub Desktop.
require 'ffi'
module FFISample
extend FFI::Library
ffi_lib 'target/release/libffi_sample.dylib'
attach_function :perform, [:string], :string
end
puts FFISample.perform('こんにちわ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment