phasm/wat2wasm.py
Johan B.W. de Vries 96f52a274c Minor cleanup
- Removed unused stubs
- Removed wabt dependency since wasmtime can compile
  wat2wasm as well.
- Removed wasm2c references, it was never tested.
2025-04-05 16:02:55 +02:00

12 lines
264 B
Python

import sys
from wasmtime import wat2wasm
def main(_prog: str, inp: str, _dash_o: str, out: str) -> None:
with open(inp, 'rb') as inp_obj:
with open(out, 'wb') as out_obj:
out_obj.write(wat2wasm(inp_obj.read()))
if __name__ == '__main__':
main(*sys.argv)