I'm thinking there are two options. Either having some kind of
The AWS Lambda console has a code editor/runner that looks a lot like what Hacker Rank has, but you are running on the real Lambda system which has some characteristics of VMs and containers.
Curlang uses WebAssembly to be local to the browser. I see this becoming a trend.