wabt icon indicating copy to clipboard operation
wabt copied to clipboard

can't transfer http.wasm to wat

Open novvoo opened this issue 3 months ago • 1 comments

  • server:
wasmtime serve  http.wasm
Serving HTTP on http://0.0.0.0:8080/
  • client:
curl -vv -iL 127.0.0.1:8080 
10:29:36.090000 [0-0] * [SETUP] added
10:29:36.092000 [0-0] *   Trying 127.0.0.1:8080...
10:29:36.094000 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
10:29:36.096000 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=1
10:29:36.097000 [0-0] * Connected to 127.0.0.1 (127.0.0.1) port 8080
10:29:36.100000 [0-0] * using HTTP/1.x
10:29:36.102000 [0-0] > GET / HTTP/1.1
10:29:36.102000 [0-0] > Host: 127.0.0.1:8080
10:29:36.102000 [0-0] > User-Agent: curl/8.13.0
10:29:36.102000 [0-0] > Accept: */*
10:29:36.102000 [0-0] >
10:29:36.109000 [0-0] < HTTP/1.1 200 OK
HTTP/1.1 200 OK
10:29:36.110000 [0-0] < transfer-encoding: chunked
transfer-encoding: chunked
10:29:36.112000 [0-0] < date: Mon, 22 Sep 2025 02:29:36 GMT
date: Mon, 22 Sep 2025 02:29:36 GMT
10:29:36.114000 [0-0] <

Hello World10:29:36.116000 [0-0] * Connection #0 to host 127.0.0.1 left intact

and it can't work

wasm2wat http.wasm
0000008: error: wasm components are not yet supported in this tool

the http server codes from here https://github.com/moonbitlang/moonbit-docs/tree/main/legacy/examples/wasi-http

http.zip

novvoo avatar Sep 22 '25 02:09 novvoo

WABT does not support the component model yet. You can use wasm-tools which also has a "wasm2wat" mode.

On Sun, Sep 21, 2025, 7:33 PM novohool @.***> wrote:

novohool created an issue (WebAssembly/wabt#2643) https://github.com/WebAssembly/wabt/issues/2643

  • server:

wasmtime serve http.wasm Serving HTTP on http://0.0.0.0:8080/

  • client:

curl -vv -iL 127.0.0.1:8080 10:29:36.090000 [0-0] * [SETUP] added 10:29:36.092000 [0-0] * Trying 127.0.0.1:8080... 10:29:36.094000 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0 10:29:36.096000 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=1 10:29:36.097000 [0-0] * Connected to 127.0.0.1 (127.0.0.1) port 8080 10:29:36.100000 [0-0] * using HTTP/1.x 10:29:36.102000 [0-0] > GET / HTTP/1.1 10:29:36.102000 [0-0] > Host: 127.0.0.1:8080 10:29:36.102000 [0-0] > User-Agent: curl/8.13.0 10:29:36.102000 [0-0] > Accept: / 10:29:36.102000 [0-0] > 10:29:36.109000 [0-0] < HTTP/1.1 200 OK HTTP/1.1 200 OK 10:29:36.110000 [0-0] < transfer-encoding: chunked transfer-encoding: chunked 10:29:36.112000 [0-0] < date: Mon, 22 Sep 2025 02:29:36 GMT date: Mon, 22 Sep 2025 02:29:36 GMT 10:29:36.114000 [0-0] <

Hello World10:29:36.116000 [0-0] * Connection #0 to host 127.0.0.1 left intact

and it can't work

wasm2wat http.wasm 0000008: error: wasm components are not yet supported in this tool

the http server codes from here https://github.com/moonbitlang/moonbit-docs/tree/main/legacy/examples/wasi-http

— Reply to this email directly, view it on GitHub https://github.com/WebAssembly/wabt/issues/2643, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTAO2STTWDV5QYBKRPCPL3T5NW7AVCNFSM6AAAAACHDYUDWGVHI2DSMVQWIX3LMV43ASLTON2WKOZTGQZTQOJVGQ3TMMQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

keithw avatar Sep 22 '25 02:09 keithw