
Show HN: A WebAssembly System Interface Implementation for Deno - caspervonb
https://github.com/caspervonb/deno-wasi
======
gitgud
So this can compile other languages to run on deno using Web assembly?

Seems like a lot of indirection to emulate the native assembly code. I guess
it's cross-platform though right?

~~~
tylerchilds
I imagine this type of approach will replace TypeScript in the long run.
Instead of some wonky half-assed typed language that's chosen for running on a
server and client, you can compile Java to wasm that can run on the server and
client.

~~~
bastawhiz
That's a bit of a stretch. What makes you think WASM is going to give
developers an appetite for statically typed languages? If anything, WASM opens
the door to Python, Lua, and plenty of other languages that are not statically
typed to run (performantly!) in places where only JavaScript has historically
been practical.

~~~
wtetzner
> What makes you think WASM is going to give developers an appetite for
> statically typed languages?

Well, they did say it will give TypeScript developers better alternatives.
Presumably, if you're using TypeScript, you already had an appetite for
statically typed languages.

~~~
bastawhiz
I suppose it depends on what problem you use TypeScript to solve. If you're
writing a complicated and self-contained system, sure, I can see the appeal of
"upgrading" to Java. If you're trying to enforce contracts between different
codebases/libraries/etc., WASM hardly provides a better alternative:
integrating with other libraries—especially JS ones—or even the DOM is non-
trivial.

Which is to say, using TypeScript as a quality of life improvement to provide
autocomplete and checking for easily-detectable bugs is not going to lend
itself well to being replaced with WASM. If the goal is to write a 100% typed
codebase (e.g., having a complex, entirely self-contained tool that runs in
multiple environments), you will have better luck. But I suspect the number of
folks that could benefit from that are fairly low, because it assumes that
JavaScript is the bottleneck for correctness and performance. But if the real
reason why you're using TypeScript is that JavaScript was your only choice and
you like the increase in safety, having a more appropriate language could be
an even more attractive option.

------
gutino
This is amazing and very useful, now you will be able to compile any c++, c,
rust app to wasm and run inside Deno, so you can easily distribute to any
platform.

No need to re-write your current native apps, just compile them to wasm and
they can run everywhere!

