Or you can just compile to web assembly and ignore the Javascript. Compiling down to a high level language which, itself, can often be a bit surprising or even ambiguous has always struck me as an approach of last resort. And it's not really our last resort anymore.