Initial commit
This commit is contained in:
11
examples/basic.exs
Normal file
11
examples/basic.exs
Normal file
@@ -0,0 +1,11 @@
|
||||
defmodule MyLib do
|
||||
use FFI.Library
|
||||
|
||||
ffi_lib "c"
|
||||
|
||||
attach_function :puts, [:string], :int
|
||||
end
|
||||
|
||||
{:ok, pid} = MyLib.start_link
|
||||
|
||||
MyLib.puts(pid, "Hello world")
|
||||
Reference in New Issue
Block a user