Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
4 changes: 2 additions & 2 deletions erlang_ls.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ diagnostics:
apps_dirs:
- "src"
- "src/*"
include_dirs:
- "src/include"
include_dirs:
- "src"
- "src/include"
- "_build/default/lib"
- "_build/default/lib/*/include"
lenses:
enabled:
- ct-run-test
Expand Down
33 changes: 21 additions & 12 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
]}.

{cargo_opts, [
{src_dir, "native/dev_snp_nif"},
{src_dir, "deps/elmdb/native/elmdb_nif"}
]}.

Expand All @@ -81,29 +80,35 @@

{port_env, [
{"(linux|darwin|solaris)", "CFLAGS",
"$CFLAGS -I${REBAR_ROOT_DIR}/_build/wamr/core/iwasm/include -I/usr/local/lib/erlang/usr/include/"},
{"(linux|darwin|solaris)", "LDFLAGS", "$LDFLAGS -L${REBAR_ROOT_DIR}/_build/wamr/lib -lvmlib -lei"},
{"(linux|darwin|solaris)", "LDLIBS", "-lei"}
"$CFLAGS "
"-Wno-error=incompatible-pointer-types "
"-Wno-error=pointer-sign "
"-I${REBAR_ROOT_DIR}/_build/wamr/core/iwasm/include "
"-I/usr/local/lib/erlang/usr/include/"},
{"(linux|darwin|solaris)", "LDFLAGS", "$LDFLAGS -L${REBAR_ROOT_DIR}/_build/wamr/lib -lvmlib -lei"},
{"(linux|darwin|solaris)", "LDLIBS", "-lei"},
{"linux", "CFLAGS", "$CFLAGS -I/usr/include/openssl"},
{"linux", "LDFLAGS", "$LDFLAGS -lssl -lcrypto"}
]}.

{post_hooks, [
{"(linux|darwin|solaris)", clean, "rm -rf \"${REBAR_ROOT_DIR}/_build\" \"${REBAR_ROOT_DIR}/priv\""},
{"(linux|darwin|solaris)", compile, "echo 'Post-compile hooks executed'"},
{ compile, "rm -f native/hb_beamr/*.o native/hb_beamr/*.d"},
{ compile, "rm -f native/hb_keccak/*.o native/hb_keccak/*.d"},
{ compile, "rm -f native/dev_snp_nif/*.o native/dev_snp_nif/*.d"},
{ compile, "rm -f native/snp_nif/*.o native/snp_nif/*.d"},
{ compile, "mkdir -p priv/html"},
{ compile, "cp -R src/html/* priv/html"},
{ compile, "mkdir -p priv/ovmf"},
{ compile, "cp OVMF-1.55.fd priv/ovmf/OVMF-1.55.fd"},
{ compile, "cp _build/default/lib/elmdb/priv/crates/elmdb_nif/elmdb_nif.so _build/default/lib/elmdb/priv/elmdb_nif.so 2>/dev/null || true" }
]}.

{provider_hooks, [
{pre, [
{compile, {cargo, build}}
]},
{post, [
{compile, {pc, compile}},
{clean, {pc, clean}},
{clean, {cargo, clean}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why deliberately delete the build artifacts rather than this? Or perhaps the opposite: Is this even necessary anyway? Would be much nicer if we weren't wiping all of these build artifacts at all (including for WAMR) on node start every time. It is noisy and slow.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im not sure I undertstand

{clean, {pc, clean}}
]}
]}.

Expand All @@ -118,6 +123,9 @@
{"./priv/hb_keccak.so", [
"./native/hb_keccak/hb_keccak.c",
"./native/hb_keccak/hb_keccak_nif.c"
]},
{"./priv/snp_nif.so", [
"./native/snp_nif/snp_nif.c"
]}
]}.

Expand All @@ -132,7 +140,8 @@
{prometheus_httpd, "2.1.15"},
{prometheus, "6.0.3"},
{graphql, "0.17.1", {pkg, graphql_erl}},
{luerl, "1.3.0"}
{luerl, "1.3.0"},
{ssl_cert, "1.0.1"}
]}.

{shell, [
Expand All @@ -144,7 +153,7 @@
]}.

{relx, [
{release, {'hb', "0.0.1"}, [hb, b64fast, cowboy, gun, luerl, prometheus, prometheus_cowboy, elmdb]},
{release, {'hb', "0.0.1"}, [hb, b64fast, cowboy, gun, luerl, prometheus, prometheus_cowboy, elmdb, ssl_cert]},
{include_erts, true},
{extended_start_script, true},
{overlay, [
Expand All @@ -155,7 +164,7 @@
]}.

{dialyzer, [
{plt_extra_apps, [public_key, ranch, cowboy, prometheus, prometheus_cowboy, b64fast, eunit, gun]},
{plt_extra_apps, [public_key, ranch, cowboy, prometheus, prometheus_cowboy, b64fast, eunit, gun, ssl_cert]},
incremental,
{warnings, [no_improper_lists, no_unused]}
]}.
Expand Down
9 changes: 6 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
{<<"prometheus">>,{pkg,<<"prometheus">>,<<"6.0.3">>},0},
{<<"prometheus_cowboy">>,{pkg,<<"prometheus_cowboy">>,<<"0.2.0">>},0},
{<<"prometheus_httpd">>,{pkg,<<"prometheus_httpd">>,<<"2.1.15">>},0},
{<<"ranch">>,{pkg,<<"ranch">>,<<"2.2.0">>},0}]}.
{<<"ranch">>,{pkg,<<"ranch">>,<<"2.2.0">>},0},
{<<"ssl_cert">>,{pkg,<<"ssl_cert">>,<<"1.0.1">>},0}]}.
[
{pkg_hash,[
{<<"accept">>, <<"CD6E34A2D7E28CA38B2D3CB233734CA0C221EFBC1F171F91FEC5F162CC2D18DA">>},
Expand All @@ -30,7 +31,8 @@
{<<"prometheus">>, <<"95302236124C0F919163A7762BF7D2B171B919B6FF6148D26EB38A5D2DEF7B81">>},
{<<"prometheus_cowboy">>, <<"526F75D9850A9125496F78BCEECCA0F237BC7B403C976D44508543AE5967DAD9">>},
{<<"prometheus_httpd">>, <<"8F767D819A5D36275EAB9264AFF40D87279151646776069BF69FBDBBD562BD75">>},
{<<"ranch">>, <<"25528F82BC8D7C6152C57666CA99EC716510FE0925CB188172F41CE93117B1B0">>}]},
{<<"ranch">>, <<"25528F82BC8D7C6152C57666CA99EC716510FE0925CB188172F41CE93117B1B0">>},
{<<"ssl_cert">>, <<"5E4133E7D524141836C045838C98E69964E188707DF12032CE5DA902BB40C9A3">>}]},
{pkg_hash_ext,[
{<<"accept">>, <<"CA69388943F5DAD2E7232A5478F16086E3C872F48E32B88B378E1885A59F5649">>},
{<<"cowboy">>, <<"EA99769574550FE8A83225C752E8A62780A586770EF408816B82B6FE6D46476B">>},
Expand All @@ -42,5 +44,6 @@
{<<"prometheus">>, <<"53554ECADAC0354066801D514D1A244DD026175E4EE3A9A30192B71D530C8268">>},
{<<"prometheus_cowboy">>, <<"2C7EB12F4B970D91E3B47BAAD0F138F6ADC34E53EEB0AE18068FF0AFAB441B24">>},
{<<"prometheus_httpd">>, <<"67736D000745184D5013C58A63E947821AB90CB9320BC2E6AE5D3061C6FFE039">>},
{<<"ranch">>, <<"FA0B99A1780C80218A4197A59EA8D3BDAE32FBFF7E88527D7D8A4787EFF4F8E7">>}]}
{<<"ranch">>, <<"FA0B99A1780C80218A4197A59EA8D3BDAE32FBFF7E88527D7D8A4787EFF4F8E7">>},
{<<"ssl_cert">>, <<"2E37259313514B854EE0BC5B0696250883568CD1A5FC9EC338D78E27C521E65D">>}]}
].
Loading