Packages

A semi-useful tool to generate boilerplate when you want to use a NIF in your project. You don't really want to use a NIF in your project, until you do. Then this might save you writing most of the boilerplate.

Current section

Files

Jump to
nifty lib template.ex
Raw

lib/template.ex

defmodule Nifty.Template do
require EEx
EEx.function_from_file :def, :elixir_nif, "priv/templates/nif.ex.eex", [:name, :mod]
EEx.function_from_file :def, :nif, "priv/templates/nif.c.eex", [:name, :mod]
EEx.function_from_file :def, :makefile, "priv/templates/Makefile.eex", [:name]
end