Don't emit `module definition` or `module instance` unless present in input when generating `.bin.wast`
The PR #1796 changed the reference interpreter to generate these new commands by default in arrange.ml. Unfortunately this breaks downstream clients that consume .bin.wast.
Would it be possible to only emit module definition and module instance if they were in the original source?
I'll look into it. It might be non-trivial, since the old form is desugared in the parser already.
Edit: Won't these clients have to be adapted anyway? Otherwise they won't be able to run all tests either way.
Ok, thanks for taking a look. If it's nontrivial work, don't waste too much time on it.
Won't these clients have to be adapted anyway? Otherwise they won't be able to run all tests either way.
Yes, eventually, when tests start using the new feature. I just hit this because I was writing tests for the stack-switching proposal which recently had this change integrated, and thus Wizard couldn't run my new tests.