Packages

Wasmtime bindings for Erlang: run WebAssembly natively, call Erlang from the guest

Current section

Files

Jump to
erlang_wasmtime rebar.config
Raw

rebar.config

%% -*- erlang -*-
{erl_opts, [
debug_info,
warnings_as_errors,
warn_export_vars,
warn_unused_import
]}.
{deps, []}.
%% The NIF needs the Wasmtime C API. `scripts/build-nif.sh` downloads the
%% pinned release for the current platform into `_build/wasmtime/` (or uses
%% `WASMTIME_C_API_DIR` when set) and links it statically into the NIF. The
%% library is not in the hex package: it is 12-16 MB per platform and hex
%% tarballs are capped at 8 MB.
{pre_hooks, [
{compile, "./scripts/build-nif.sh"},
{clean,
"rm -f priv/wasmtime_nif.so priv/libwasmtime.* c_src/*.o _build/wasmtime_nif.stamp _build/probe _build/probe.c"}
]}.
{profiles, [
{test, [{erl_opts, [debug_info, nowarn_export_all]}]}
]}.
{dialyzer, [{warnings, [unknown, no_return, error_handling]}]}.
{xref_checks, [undefined_function_calls, locals_not_used, deprecated_function_calls]}.
{project_plugins, [
rebar3_ex_doc,
{rebar3_hex, "~> 7.0"},
{rebar3_lint, "~> 5.0"},
{erlfmt, "~> 1.7"}
]}.
{erlfmt, [
write,
{print_width, 100},
{files, ["{src,test,examples}/**/*.{erl,app.src}", "rebar.config", "elvis.config"]}
]}.
{ex_doc, [
{source_url, <<"https://github.com/benoitc/erlang-wasmtime">>},
{main, <<"readme">>},
{extras, [
{'README.md', #{title => <<"erlang_wasmtime">>}},
{'docs/javascript.md', #{title => <<"Run JavaScript">>}},
{'docs/python.md', #{title => <<"Run Python">>}},
{'docs/getting-started.md', #{title => <<"Getting started">>}},
{'docs/host-functions.md', #{title => <<"Host functions">>}},
{'docs/wasi.md', #{title => <<"WASI">>}},
{'docs/streams.md', #{title => <<"Streams">>}},
{'docs/references.md', #{title => <<"References">>}},
{'docs/precompiled.md', #{title => <<"Precompiled modules">>}},
{'docs/building.md', #{title => <<"Building and shipping">>}},
{'docs/troubleshooting.md', #{title => <<"Troubleshooting">>}},
{'docs/features.md', #{title => <<"Features">>}},
{'examples/README.md', #{title => <<"Examples">>, filename => <<"examples">>}},
{'docs/design.md', #{title => <<"Design">>}},
{'CONTRIBUTING.md', #{title => <<"Contributing">>}},
{'RELEASING.md', #{title => <<"Releasing">>}},
{'CHANGELOG.md', #{title => <<"Changelog">>}}
]},
{groups_for_extras, [
{<<"Guides">>, [
<<"docs/getting-started.md">>,
<<"docs/javascript.md">>,
<<"docs/python.md">>,
<<"docs/host-functions.md">>,
<<"docs/wasi.md">>,
<<"docs/streams.md">>,
<<"docs/references.md">>,
<<"docs/precompiled.md">>,
<<"docs/building.md">>,
<<"docs/troubleshooting.md">>,
<<"docs/features.md">>,
<<"examples/README.md">>
]},
{<<"Development">>, [<<"docs/design.md">>, <<"CONTRIBUTING.md">>, <<"RELEASING.md">>]}
]}
]}.
{hex, [{doc, ex_doc}]}.
{alias, [{check, [{fmt, "--check"}, lint, xref, dialyzer, ct]}]}.