You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
Go and Ruby-FFI How to write a shared library in Go that can be loaded by Ruby-FFI. With the release of Go 1.5 we got access to a new buildmode called c-shared, which allows you to build shared libraries that Ruby-FFI can load. (Also, anything else that can load shared libraries) Inspiration Filippo Valsorda has already written a very nice article on Building Python modules with Go 1.5 but I natur
36. 使ãæ¹(1) module LibC extend FFI::Library ffi_lib 'c' # FFI::Library::LIBC # int puts(char*) attach_function :puts, [:string], :int end LibC.puts "Hello!" 37. 使ãæ¹(2) å :short # 16bit int :int # 32bit int :long_long # 64bit int :long # long :float # float :double # double :string # NULL-terminated :pointer # pointer :void, :float, :double, :varargs, ... 38. 使ãæ¹(3) å åæå/æ§é ä½/é¢æ°ãã¤ã³ã¿ enum :Status, [:
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}