Get the latest tech news

A masochist's guide to web development


’s guide to web development Table of contents - Introduction - Setting things up - Hello world - Intermezzo I: What is WebAssembly? - Building a library - Intermezzo II: JavaScript and the DOM - Loading the library and making it a module - Multithreading - Intermezzo III: Web Workers and Spectre - Don’t block the main thread! - Callback functions - Persistent storage - Closing thoughts Introduction I have recently worked on making a web application out of my latest Rubik’s cube optimal solver. This involved building a rather complex C code base (with multithreading, SIMD, callback functions and whatnot) to WebAssembly via Emscripten, and writing a minimal amount of JavaScript and HTML for the frontend.

This involved building a rather complex C code base (with multithreading, SIMD, callback functions and whatnot) to WebAssembly via Emscripten, and writing a minimal amount of JavaScript and HTML for the frontend. Since this is something we’ll do soon, we can forget about this option and just take it as a fact that the.wasm files generated by emscripten require some glue JavaScript code to actually run, but in case you are interested you can check out the official documentation. In 2018, a CPU vulnerability called Spectre was found, and it was shown that an attacker could take advantage of shared memory between the main browser thread and web workers to execute code remotely.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Guide

Guide

Photo of web development

web development

Photo of masochist

masochist

Related news:

News photo

Nintendo Switch 2 guide: pre-order links, accessories and launch games

News photo

The Guide to Cloudflare's Durable Objects

News photo

When Fine-Tuning Makes Sense: A Developer's Guide