Hacker News new | ask | show | jobs
by jedisct1 2576 days ago
Like... a shared library?

I have a single libmysql.so file installed on my system, and it's used by Python, Ruby, C and PHP.

Why should I replace libmysql.so with libmysql.wasm?

2 comments

Because libmysql.wasm runs on any platform whereas libmysql.so has to be replaced with libmysql.dll on windows.
Just like libmysql.dll, that libmysql.wasm will only run on Windows, if there is a Windows application that knows what to do with it.
Yea, that's generally how code works - no?

This is simply an abstraction "everyone" has agreed on. Conceptually no different than if everyone had agreed on Java, or Python, or Brainfuck.

Exactly, and neither the first not the last at it.
But that's not a bad thing. To me it appears better than previous attempts, I heavily look forward to it.

The HN drama around WASM and cries of the days of Java always leave me perplexed. Makes me wish Java didn't suck so bad so these convos could end haha.

All previous attempts, starting all way the back to UNCOL in 1958?

WASM only exists due to political reasons of Mozilla not embracing PNaCL.

If Chrome already had the current market share back then, we wouldn't be seeing such adoration, as if no one ever done it before.

A shared library isn’t really shareable across OSes or platforms. The neat thing about a WASM library is you can load it in your browser, in your native app or in your Python script.