Is there a wat-format tool for formatting wat files? Perhaps in the same way they wasm-tools print prints wat? Would that be useful?
While wasm-tools print
will reformat the wit I don't know anything that would format in-place
oh dear sorry I see now that I actually sit down and read your whole message you've already found wasm-tools print
.
That being said I think it'd be neat to have like a wasm-tools fmt foo.wat
. It may not be the hardest thing in the world because the formatter can probably largely work at the s-expression level rather than worrying much about internal structure, probably still a nontrivial project though
Last updated: Dec 23 2024 at 12:05 UTC