rebar.config

{minimum_otp_vsn, "28"}.

{erl_opts, [debug_info, warnings_as_errors]}.

{deps, []}.

{pre_hooks, [
    {clean, "rm -f priv/*.so"},
    {clean, "rm -rf _build/cmake"},
    {"(linux|darwin|solaris)", compile, "./do_cmake.sh $ERLLAMA_OPTS"},
    {"(freebsd|netbsd|openbsd)", compile, "./do_cmake.sh $ERLLAMA_OPTS"}
]}.

{post_hooks, [
    {"(linux|darwin|solaris)", compile, "./do_llama.sh $ERLLAMA_BUILDOPTS"},
    {"(freebsd|netbsd|openbsd)", compile, "./do_llama.sh $ERLLAMA_BUILDOPTS"}
]}.

{project_plugins, [
    {rebar3_proper, "~> 0.12"},
    {rebar3_hex, "~> 7.0"},
    {rebar3_ex_doc, "~> 0.2"},
    {rebar3_lint, "~> 5.0"},
    {erlfmt, "~> 1.7"}
]}.

{shell, [
    {apps, [erllama]}
]}.

{relx, [
    {release, {erllama, "0.1.0"}, [erllama, sasl]},
    {dev_mode, true},
    {include_erts, false},
    {sys_config, "./config/sys.config"}
]}.

{profiles, [
    {test, [
        {deps, [
            {proper, "1.4.0"}
        ]},
        {erl_opts, [debug_info, nowarn_export_all]}
    ]},
    {prod, [
        {relx, [
            {dev_mode, false},
            {include_erts, true}
        ]}
    ]}
]}.

{erlfmt, [
    write,
    {files, [
        "{src,test,include}/**/*.{hrl,erl,app.src,escript}",
        "rebar.config"
    ]}
]}.

{dialyzer, [
    {warnings, [unknown, no_return, error_handling]},
    {plt_apps, top_level_deps},
    {plt_extra_apps, [os_mon]}
]}.

{xref_checks, [
    undefined_function_calls,
    locals_not_used,
    deprecated_function_calls
]}.

{hex, [
    {doc, ex_doc}
]}.

{ex_doc, [
    {source_url, <<"https://github.com/erllama/erllama">>},
    {extras, [
        {<<"README.md">>, #{title => <<"Overview">>}},
        {<<"CHANGELOG.md">>, #{title => <<"Changelog">>}},
        {<<"guides/loading.md">>, #{title => <<"Loading a model">>}},
        {<<"guides/caching.md">>, #{title => <<"Caching">>}},
        {<<"guides/configuration.md">>, #{title => <<"Configuration">>}},
        {<<"guides/building.md">>, #{title => <<"Building">>}},
        {<<"guides/examples.md">>, #{title => <<"Examples">>}},
        {<<"internals/cache-design.md">>, #{title => <<"Cache design">>}},
        {<<"internals/publish-protocol.md">>, #{title => <<"Publish protocol">>}},
        {<<"internals/nif-safety.md">>, #{title => <<"NIF safety">>}},
        {<<"AGENTS.md">>, #{title => <<"Contributor guide">>}},
        {<<"UPDATE_LLAMA.md">>, #{title => <<"Updating llama.cpp">>}},
        {<<"LICENSE">>, #{title => <<"License">>}}
    ]},
    {groups_for_extras, [
        {<<"Guides">>, [
            <<"guides/loading.md">>,
            <<"guides/caching.md">>,
            <<"guides/configuration.md">>,
            <<"guides/building.md">>,
            <<"guides/examples.md">>
        ]},
        {<<"Internals">>, [
            <<"internals/cache-design.md">>,
            <<"internals/publish-protocol.md">>,
            <<"internals/nif-safety.md">>
        ]},
        {<<"Contributing">>, [
            <<"AGENTS.md">>,
            <<"UPDATE_LLAMA.md">>
        ]}
    ]},
    {main, <<"readme">>}
]}.