News for hackers. Stuff that matters.
Re:Wasmer – Universal Binaries Powered by WebAssembly by faissaloo on Saturday December 08, 2018 @07:48PM (#18638470)
How is this different from what Java was a few years back?
Re:Wasmer – Universal Binaries Powered by WebAssembly by Felz on Sunday December 09, 2018 @01:07AM (#18639634)
You can compile Rust/C/etc executables to it, the stdlib might be different or nonexistant (unclear to me), WASM doesn't have a GC (yet) and you can get stacklike semantics, probably fewer security holes, the installer probably doesn't bundle other softfare.

But yes, technically speaking it's not that much different from JVM bytecode execution. Software is more consensus than breakthroughs though, so WASM might succeed where Java failed (well, kind of) because we're ready for it and the major players want it.

Re:Wasmer – Universal Binaries Powered by WebAssembly by nazka on Saturday December 08, 2018 @03:20PM (#18637296)
For people who like the idea, check Terrarium[1] from Fastly. They use Wasmer with Fastly services to have edge computing capabilities. Think AWS Lambda but in a CDN. It looks promising!

[1] https://wasm.fastlylabs.com/

Re:Wasmer – Universal Binaries Powered by WebAssembly by maxmcd on Saturday December 08, 2018 @05:23PM (#18637887)
Surely they’re not using wasmer. They’re using cranelift with their own runtime, correct? This talk mentions a cranelift runtime fastly built in-house. https://youtu.be/FkM1L8-qcjU
Re:Wasmer – Universal Binaries Powered by WebAssembly by nazka on Monday December 10, 2018 @04:12AM (#18646387)
Yes you are right. I got confused with all the techs out there... Thank you for your correction.
Re:Wasmer – Universal Binaries Powered by WebAssembly by cbsmith on Saturday December 08, 2018 @04:40PM (#18637695)
> Think AWS Lambda but in a CDN.

So, AWS Lambda@Edge

Re:Wasmer – Universal Binaries Powered by WebAssembly by nazka on Monday December 10, 2018 @04:13AM (#18646390)
Yes I didn't know this existed already. Thank you to point that
Re:Wasmer – Universal Binaries Powered by WebAssembly by cbsmith on Tuesday December 11, 2018 @05:28AM (#18654346)
It's a lot of fun. Enjoy. :-)
Re:Wasmer – Universal Binaries Powered by WebAssembly by amelius on Saturday December 08, 2018 @03:26PM (#18637327)
> Once installed, you will be able to run any wasm module (including Nginx!)

If you're running on Linux, I suppose that applies only to WASM modules that interface with a POSIX system (?)

Re:Wasmer – Universal Binaries Powered by WebAssembly by colordrops on Saturday December 08, 2018 @03:32PM (#18637355)
Doesn't WASM interface with a JS/WASM VM, which is then responsible for interfacing with the OS? There are plenty of POSIX compatible VMs, including V8, the Chrome engine.
Re:Wasmer – Universal Binaries Powered by WebAssembly by amelius on Saturday December 08, 2018 @03:34PM (#18637365)
What is the interface called then?

Sorry for being confused. Isn't Nginx coded for a POSIX system? Or did they specifically port it to WASM (with its own interface)

Re:Wasmer – Universal Binaries Powered by WebAssembly by Matthias247 on Saturday December 08, 2018 @05:01PM (#18637789)
The "posix" needs to be on the other side. Things like v8 use a posix interface for interacting with the OS. However they don't provide a posix interface the code which is running inside the VM.

I think what was needed was that someone implemented posix APIs inside webassembly, by delegating to the javascript APIs that e.g. node.js provides, or by building a native module that proxies those calls.

Re:Wasmer – Universal Binaries Powered by WebAssembly by colordrops on Saturday December 08, 2018 @08:06PM (#18638578)
Ah, I misunderstood the question.
Re:Wasmer – Universal Binaries Powered by WebAssembly by alexandernst on Saturday December 08, 2018 @03:25PM (#18637315)
Is there anywhere I can find actual numbers in terms of performance gains from running NGINX like this vs "the usual way"?
Re:Wasmer – Universal Binaries Powered by WebAssembly by syrusakbary on Saturday December 08, 2018 @03:43PM (#18637404)
They both should have very similar numbers in performance. Right now there is a bit of slowdown at startup time because of function compilation, but we are planning to improve this quite soon!
Re:Wasmer – Universal Binaries Powered by WebAssembly by IAmEveryone on Saturday December 08, 2018 @03:34PM (#18637364)
I’d be surprised to see any “gains” (but also thankful for specific figures).
Re:Wasmer – Universal Binaries Powered by WebAssembly by akhilcacharya on Saturday December 08, 2018 @03:18PM (#18637287)
Stupid question - how are they handling system calls in wasmer? I can't seem to find the answer easily.
Re:Wasmer – Universal Binaries Powered by WebAssembly by syrusakbary on Saturday December 08, 2018 @03:41PM (#18637396)
We first wanted to focus on running Emscripten-generated WebAssembly files, so we are wrapping the syscalls that Emscripten is using with the real syscalls under the hood.

Here's an example of that: https://github.com/wasmerio/wasmer/blob/master/src/apis/emsc...

Re:Wasmer – Universal Binaries Powered by WebAssembly by akhilcacharya on Sunday December 09, 2018 @02:19AM (#18639804)
Would support for something like wasm-bindgen be possible eventually?
Re:Wasmer – Universal Binaries Powered by WebAssembly by bno1 on Saturday December 08, 2018 @03:28PM (#18637340)
I'm not very well informed but I assume that you just call functions which are implemented by the VM, in the same manner you do filesystem operations in nodejs.