[erlang-questions] Documentation on Binding a C library to Erlang

Jared Kofron jared.kofron@REDACTED
Sat Feb 1 00:16:02 CET 2014


Also, I highly recommend finding a good NIF library to read the code for -
it will be way, way more clear if you do so.

IIRC there's a good NIF library for interacting with sqlite3 that is very
readable and will give you an idea of what a practical
implementation looks like.  It might be this one?

https://github.com/mmzeeman/esqlite


On Fri, Jan 31, 2014 at 1:42 PM, Steve Vinoski <vinoski@REDACTED> wrote:

>
>
>
> On Fri, Jan 31, 2014 at 4:35 PM, kraythe . <kraythe@REDACTED> wrote:
>
>> Greetings, I am a newbie to erlang. I am interested in binding a c
>> library that I have as source (that I have written) to Erlang. In Java I
>> would use JNI. In Erlang I don't know. Can anyone point me at where the
>> docs are for this? Especially a tutorial. Google has been unrevealing and i
>> have been through hundreds of dead ends.
>>
>
> If you really want the C library running together with the Erlang VM,
> you'll write either a set of native implemented functions (NIFs) or a
> linked-in driver. See the links below.
>
> http://www.erlang.org/doc/tutorial/nif.html
> http://www.erlang.org/doc/man/erl_nif.html
> http://www.erlang.org/doc/apps/erts/driver.html
> http://www.erlang.org/doc/man/erl_driver.html
>
> --steve
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140131/467d9c78/attachment.htm>


More information about the erlang-questions mailing list