dispatchrun / net

Go package implementing WASI socket extensions
Apache License 2.0
137 stars 7 forks source link

link error with tinygo how to not pull in net.Resolver? #37

Open ldemailly opened 1 month ago

ldemailly commented 1 month ago

Just doing a wasip1.Listen socket and getting link errors - any way to skip the dial stuff that I don't need on a listen?

# github.com/stealthrocket/net/wasip1
../../../../go/pkg/mod/github.com/stealthrocket/net@v0.2.1/wasip1/dial_wasip1.go:32:22: undefined: net.Resolver
ldemailly commented 1 month ago

code that does work with regular go:

https://github.com/ldemailly/go-scratch/blob/main/tinyhttp/tinyhttp.go

achille-roussel commented 1 month ago

Hello @ldemailly, thanks for reporting!

If you are compiling with Tinygo, it might be beacuse the Tinygo standard library doesn't have a net.Resolver type.

The code in this repository was only tested with the mainstream Go compiler.

ldemailly commented 1 month ago

Thanks, I'm trying from both ends to get something working :) Waiting a bit on tinygo side for clarity