I am making a WebAssembly app with Go. Currently, it is 8.1MB uncompressed and 2MB gzipped. This is too much. I want to use TinyGo, but I need to send HTTP GET requests. TinyGo currently doesn't support net/http. But, TinyGo has syscall/js which allows you to do fetch(). But I couldn't find out how to use JS await using syscall/js. I also tried using channels from handlers and returning the value of channels, but this gave me fatal error: All goroutines are asleep. Deadlock!.
Are there any alternatives for net/http that work with tinygo or ways to use fetch and return values instead of having callbacks?