Packages

Create new rustler-based Erlang NIF libs in no time

Current section

Files

Jump to
rebar3_rustler priv rustler_nif.template
Raw

priv/rustler_nif.template

{description, "A basic Erlang NIF written in Rust using rustler"}.
{variables, [
{name, "my_nif", "Name of the Erlang NIF lib"},
{desc, "An Erlang NIF written in Rust", "Short description of the lib"}
]}.
%% Erlang code templates
{template, "_src/my_lib.erl", "src/{{name}}.erl"}.
% Rust code templates
{template, "_native/_Cargo.toml", "native/{{name}}/Cargo.toml"}.
{template, "_native/lib.rs", "native/{{name}}/src/lib.rs"}.
{template, "_native/_README.md", "native/{{name}}/README.md"}.
{template, "_native/_.cargo/_config", "native/{{name}}/.cargo/config"}.