Official documentation: http://erlang.org/doc/man/erl_nif.html
The most important structs, types and macros of the Erlang C API are the following:
ERL_NIF_TERM: the type for Erlang terms. This is the return type that NIF functions must follow.
ERL_NIF_INIT(MODULE, ErlNifFunc funcs[], load, relo...