News for hackers. Stuff that matters.
Re:Firefox’s new streaming and tiering compiler by gigatexal on Wednesday January 17, 2018 @12:13PM (#16169654)
Yeah I read the article too and thought: but what can I do with wasm?
Re:Firefox’s new streaming and tiering compiler by kbumsik on Wednesday January 17, 2018 @12:34PM (#16169880)
You can import C (and many others) libraries without re-implementing it in JS for browsers. In my company's case, we compile C-written libopus almost directly to encode audio streams into Opus on browsers, not on servers. In this way we benefit much less data traffic and server CPU loads.
Re:Firefox’s new streaming and tiering compiler by QAkICoU7IDNkpFu on Wednesday January 17, 2018 @07:54PM (#16173662)
>You can import C (and many others) libraries

This means compiling the lib to wasm, right? At first I was thinking of running JS clientside that imports some C lib somehow, which confused me.

Re:Firefox’s new streaming and tiering compiler by kbumsik on Wednesday January 17, 2018 @09:18PM (#16174108)
Yes. The C lib will be compiled into wasm. You can use the wasm-compiled code in a browser through JS wrappers. So you can say importing C lib on JS client side anyway.

Note that wasm's main objective is to run non-JS code on browsers, not for a faster JS.

Here is the best overview and tutorial I've ever seen in HN , if you are interested: https://news.ycombinator.com/item?id=15958827

Re:Firefox’s new streaming and tiering compiler by gigatexal on Saturday January 20, 2018 @08:54AM (#16193317)
So you could do the same with Cython then, too? Interesting.
Re:Firefox’s new streaming and tiering compiler by kbumsik on Monday January 22, 2018 @03:14AM (#16202745)
I've never experienced with Cython. But if Cython is to compile anPython file into a C file then probably.