DEV Community

Discussion on: Supercharge your TypeScript with AssemblyScript

Collapse
 
jwp profile image
John Peters

Nice... One step closer to the Isomorphic stack. I was wondering when Javascript would be WASM compatible, looks like once again, Typescript beat them to it.

Collapse
 
dorin profile image
Dorin

I'm not sure I got your comment right, but as far as I know, you could execute WASM through JavaScript pretty much since WebAssembly got released.
Also, TypeScript compiles to JavaScript, which is the only way you can run TypeScript in the browser or with NodeJS.
In the example I gave, we compile AssemblyScript to WebAssembly and TypeScript to JavaScript, which essentially lets us run the WASM in JS.

Collapse
 
jwp profile image
John Peters

I didn't realize Javascript compiled to native code.

Thread Thread
 
dorin profile image
Dorin

JS gets compiled to a WebAssembly-like bytecode which then gets interpreted. What WebAssembly gives us is the opportunity to skip this first compilation step, hence the better performance.