WASM programs can run in two types of environments:
The web browser (e.g. Firefox, Chrome, Safari, Edge)
A server-side runtime (e.g. WasmEdge, Wasmtime, Wasmer, WAMR)
If you are running on the web (type 1), you can't open raw TCP connections for security reasons. The closest thing is WebSockets, or you can use some kind of HTTP-based protocol to communicate with the server. Both options require your game server to understand some higher-level protocol than raw TCP.
I was planning to run it in the browser. That's a shame, as I didn't want to use HTTP, as I have other clients that won't be running in the web and it would be unnecessary. I guess I could just send my JSON through HTTP requests then? Would I be using something like Actix or Rocket?
On the server-side, yes. You could either have a separate web server proxying requests to your TCP-based game server, or have one server program open two network ports (one for HTTP/WebSockets and the other for raw TCP).