Sha256: 02c5dd9125a2fcc8264f226a32d80b70340567d9dfa2a0cfb1a9ddd1602888c5

Contents?: true

Size: 197 Bytes

Versions: 7060

Compression:

Stored size: 197 Bytes

Contents

require 'ffi'

module Foo
  extend FFI::Library
  ffi_lib FFI::Library::LIBC
  attach_function("cputs", "puts", [ :string ], :int)
end
Foo.cputs("Hello, World via libc puts using FFI on MRI ruby")

Version data entries

7,060 entries across 7,054 versions & 41 rubygems

Version Path
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/2.7.0/gems/ffi-1.14.2/samples/hello.rb
vagrant-unbundled-2.2.16.0 vendor/bundle/ruby/3.0.0/gems/ffi-1.15.0/samples/hello.rb
mfk_openapi_ruby_client-1.0.0 vendor/bundle/ruby/2.7.0/gems/ffi-1.14.2/samples/hello.rb
ffi-1.15.0 samples/hello.rb
ffi-1.15.0-java samples/hello.rb
ffi-1.15.0-x64-mingw32 samples/hello.rb
ffi-1.15.0-x86-mingw32 samples/hello.rb
logstash-output-newrelic-1.2.0 vendor/bundle/jruby/2.5.0/gems/ffi-1.14.2-java/samples/hello.rb
vagrant-unbundled-2.2.14.0 vendor/bundle/ruby/2.7.0/gems/ffi-1.14.2/samples/hello.rb
ffi-1.14.2-java samples/hello.rb
ffi-1.14.2-x86-mingw32 samples/hello.rb
ffi-1.14.2-x64-mingw32 samples/hello.rb
ffi-1.14.2 samples/hello.rb
qiita_org-0.1.35 gems/ruby/2.7.0/gems/ffi-1.13.1/samples/hello.rb
ffi-1.14.1-x64-mingw32 samples/hello.rb
ffi-1.14.1-x86-mingw32 samples/hello.rb
ffi-1.14.1-java samples/hello.rb
ffi-1.14.1 samples/hello.rb
ffi-1.14.0-x64-mingw32 samples/hello.rb
ffi-1.14.0-x86-mingw32 samples/hello.rb