I was using asm.js in the past, but WASM gives a noticeable and necessary performance boost.
Which specific CPUs or applications that you emulate really take advantage of the performance boost that WASM provides?
Right now the emulators are all in JavaScript (except for MAME) which makes integrating with the IDE's debugging tools a little easier. It's performant enough for now, since we only have 8-bit platforms at low clock speeds.
Integrating a C emulation library like https://github.com/floooh/chips should be doable, since it doesn't have any dependencies.
[1] https://tech.ebayinc.com/engineering/webassembly-at-ebay-a-r...
Edit: here's the PR for switching from asm.js to WASM, in case anyone's interested: https://github.com/vector-im/riot-web/pull/7385/files apparently it merged in Oct 2018.
I'm excited to see how I can improve upon it in the future, and make it even faster! It's on GitHub here, any feature requests or suggested improvements would be greatly appreciated too: https://github.com/silvia-odwyer/photon
The browser support is good enough for our customer base, as it works across all operating systems and mobile devices, and we can fall back for asm.js for IE11.
Using the whole .NET ecosystem from browser, yea I think there's some good success stories ;)
PSPDFKit uses it for their pdf editor.
Unreal Engine/Unity uses it for their browser support.
It's used in production in many places either as modules or entire apps.
Except for some noob mistakes when implementing the PoC it’s worked remarkably well, much better than I though it would.
Pretty sure Electron provides IndexedDB though.
(Ref: https://nolanlawson.com/2015/09/29/indexeddb-websql-localsto..., vaguely https://nolanlawson.github.io/offlinefirst-2016-03/)
The only downside so far is that the embedded size is quite large, so we do take a small hit in startup latency (sub second still) and if we ever end up having a requirement to work across the internet (I doubt it) it’s going to hurt because we’d be looking at a 3mb+ download (quite cacheable though.)
Anyway, point is our need was mainly SQL the language and not so much the storage, that’s kind of secondary, though SQLite really makes that part easy too.
I just realized the links I posted didn't include the article I had in mind when I went link-digging (and didn't properly check the results, woops). I found it: https://nolanlawson.com/2014/04/26/web-sql-database-in-memor...
Potentially interestingly, I re-found the link above via hn.algola.com, which also found me the comments (for the only time the above link was posted), at https://news.ycombinator.com/item?id=7661236. The top comment thread there points to https://github.com/kripken/sql.js, which was started pre-WebAssembly but now builds for WASM, and the network tab in devtools is telling me it's a 497KB download. It says it takes the position of providing a first-class JavaScript API instead of C bindings, and that you have to implement your own save/load<->import/export layer. You may have already discovered and discarded this possibility.
FWIW, if using SQLite does stick, I reckon that an article (even a small one) about the journey/decision process/implementation gotchas/etc - and particularly details about the use cases, and why SQLite shines for your scenario - would probably be received very positively.
Thanks for replying! (My fast response time was due to fun timing: I literally just opened my laptop this morning, checked HN, and saw your comment posted "0 minutes ago" :D)
You can jump to 47 minutes in to catch a little bit of the web animation in action, but as it was over conference WiFi, it was a bit wonky.
In my experience in SF I encounter many never-JSers. Being a JS fan, for certain things, I don't get the hate. So maybe I feel threatened in a way, but I'm not going around wishing for the death of python or Haskell. That's all. I am reading random internet commenters and getting slightly upset. That's on me.
I can't imagine JS will go anywhere anytime soon, especially since it still needs to be called from DOM manipulation,but the ability to code a full stack in a single non-JS language and run it at near-native performance is going to be very useful as more apps become web based and complex. Even from a skills point of view, you can now have backend and front-end developers skillsets are slightly more merged so easier to swap around resources.
Think about how you would do ML with just python. That’d be insane. And thankfully the packages you need are implemented in c or cuda with python bindings. 99% of ml people never see the insides of np, sklearn or tf. But you’re glad these aren’t implemented in python.
Similarly, you’re glad for webgl if you need to do lots of parallelizable computations (cfd, ml, 3d). But glsl was never bashing at js. Just that using js for these task isnt feasible.
Similarly, now you can use fast code from js. Essentially, you have a bunch of matrices use webgl, otherwise wasm. And orchestrate everything from js. Like ml peeps do with python, c and cuda.
For the better or the worse...
https://www.forcepoint.com/blog/x-labs/browser-mining-coinhi...