2015-09-20 19:30:19 -04:00
2016-12-02 09:55:42 -05:00
2016-06-13 02:19:01 -04:00
2015-09-20 19:30:19 -04:00
2015-09-20 19:30:19 -04:00
2016-12-02 09:56:03 -05:00
2016-06-13 02:46:22 -04:00
2016-06-08 17:45:46 -04:00
2016-06-13 02:36:44 -04:00

FFI

An easy way to call external functions (e.g. C functions) from Elixir.

Inspired by Ruby's FFI

** This is alpha software **

Example Program

defmodule MyLib do
  use FFI.Library, name: "libstdc++.so.6"

  attach_function :puts, [:string], :int
end

MyLib.puts("Hello World from C stdlib")

Installation

The package can be installed by adding ffi to your list of dependencies in mix.exs:

def deps do
  [{:ffi, git: "https://github.com/joshnuss/elixir-ffi.git"}]
end

Running Examples

mix run examples/basic.exs

License

MIT

Description
Migration from elixir-ffi due to it's mixfile being deprecated as of now. - Updated mixfile - Slight code changes to be more modern/functional (- Better docs)
Readme 60 KiB
Languages
Elixir 52.4%
C 42.9%
Makefile 4.7%