net icon indicating copy to clipboard operation
net copied to clipboard

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

Open ldemailly opened this issue 1 year ago • 3 comments

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/[email protected]/wasip1/dial_wasip1.go:32:22: undefined: net.Resolver

ldemailly avatar Jul 19 '24 00:07 ldemailly

code that does work with regular go:

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

ldemailly avatar Jul 19 '24 00:07 ldemailly

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.

achille-roussel avatar Jul 19 '24 01:07 achille-roussel

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

ldemailly avatar Jul 19 '24 01:07 ldemailly