diff --git a/examples/basic.exs b/examples/basic.exs index 58df07d..3e036fc 100644 --- a/examples/basic.exs +++ b/examples/basic.exs @@ -6,6 +6,4 @@ defmodule MyLib do attach_function :puts, [:string], :int end -{:ok, pid} = MyLib.start_link - -MyLib.puts(pid, "Hello world") +IO.inspect MyLib.puts("Hello world") diff --git a/lib/ffi/library.ex b/lib/ffi/library.ex index 164aff1..b09cc61 100644 --- a/lib/ffi/library.ex +++ b/lib/ffi/library.ex @@ -2,13 +2,6 @@ defmodule FFI.Library do defmacro __using__(_x) do quote do import FFI.Library - - def start_link(args \\ []) do - GenServer.start_link(__MODULE__, :init, []) - end - - def init(state), - do: {:ok, state} end end