Open mversic opened 3 weeks ago
The default should be to produce
debug
build.
That would not align with the "main" known WASM tool in Rust ecosystem, i.e. wasm_pack
: it uses --release
by default.
And I can understand the rationale that if you develop a WASM for web (or for Iroha) you might want it in release
mode in most cases.
That would not align with the "main" known WASM tool in Rust ecosystem, i.e.
wasm_pack
: it uses--release
by default.And I can understand the rationale that if you develop a WASM for web (or for Iroha) you might want it in
release
mode in most cases.
I see. I'm fine either way whichever will eliminate most of user questions. In this case since there is no way of running smart contracts without submitting them to iroha
, --release
as the default could be more reasonable.
The thing that I'm more interested in is that we get the possibility of building with debug/test profiles and that we consider building with those profiles in the CI. At least to get stack traces in wasm
Whenever we're using
iroha_wasm_builder
we're invokingcargo
with--release
. This should not be the default. The default should be to producedebug
build. Optionally it should be possible to build with--release
. This is howcargo
does it and is least confusing. It is also the case that most if not all of thewasm
should be built asdebug
(we can discuss the scope).