tinygo-org / tinygo

Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
https://tinygo.org
Other
15.49k stars 913 forks source link

Missing various net/http packages in std #4598

Open inliquid opened 1 week ago

inliquid commented 1 week ago

This is follow up of #4580 as the initial issue was closed.

I have same issue when trying to build module, which imports quite complex *.proto definitions:

$ tinygo build -o wasm/plugin.wasm -scheduler=none -target=wasip1 --no-debug ./wasm
../../../../pkg/mod/golang.org/x/net@v0.30.0/http2/transport.go:26:2: package net/http/httptrace is not in std (/home/***/.cache/tinygo/goroot-8cbcb1d9555609a60075264735fce03217a624835ebf583eb96aa0c5bf08e840/src/net/http/httptrace)
../../../../pkg/mod/google.golang.org/grpc@v1.66.0-dev/internal/transport/proxy.go:29:2: package net/http/httputil is not in std (/home/***/.cache/tinygo/goroot-8cbcb1d9555609a60075264735fce03217a624835ebf583eb96aa0c5bf08e840/src/net/http/httputil)

I would like to be able to compile these dependencies into my Wasm modules. And I see a lot of progress, previously there were much more scaring compiler errors, now when reflect support is there, only those left. At the moment I have to regenerate these *.proto definitions using alternative generators.