Translate from the WebAssembly text format to binary using wasm-tools parse. You can go the other direction using print.
wasm-tools parse
print