Update readme
This commit is contained in:
22
README.md
22
README.md
@@ -1,4 +1,22 @@
|
|||||||
Ffi
|
FFI
|
||||||
===
|
===
|
||||||
|
|
||||||
** TODO: Add description **
|
An easy way to call external functions (e.g. C functions) from Elixir.
|
||||||
|
|
||||||
|
## Example Program
|
||||||
|
|
||||||
|
```elixir
|
||||||
|
defmodule MyLib do
|
||||||
|
use FFI.Library
|
||||||
|
|
||||||
|
ffi_lib "c"
|
||||||
|
|
||||||
|
attach_function :puts, [:string], :int
|
||||||
|
end
|
||||||
|
|
||||||
|
MyLib.puts(["Hello world"])
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
||||||
|
|||||||
Reference in New Issue
Block a user