There was a conversation we had around desktop apps, where we said they are mostly Electron or another way. You showed me how to think about it: it's just a browser, a browser with one tab. I'd like to build on top of that. There's a post I've shared, the screenshot. The reason I'm bringing it up is the idea of a WebGL canvas against an HTML canvas. I want to bring those two to light and go through it again, based on what I've built up to now. I know we said WebGL is the 3D canvas, or that it helps you build 3D through the browser: WebGL is the API. In another chat we talked about someone running Nintendo games on a Mac, and how the instruction language is the same on a Nintendo and a MacBook, but the graphics differ. The Mac has an API, and I don't remember its name, or Nintendo's either, but it was a good way to see how different technologies do 3D, or run it on the GPU, and the browser has its own, which is WebGL. That helped me see where WebGL stands. I want to go back and go deeper, because it's literally helping me see the landscape, like we did with servers and containers. Now I can place things easily, so let's do this for 3D, WebGL, canvas, Electron, all of that.
Put next to the browser diagram, "a mini browser inside your browser" makes literal sense. They rebuilt the part of Chrome that turns HTML and CSS into pixels, Blink and Skia, themselves, in Rust, compiled it to so it runs in the page, and pointed its output at a single canvas. As far as Chrome can tell, the whole design tool is one canvas element. Chrome only shows the pixels; it never lays out 7,000 pages.
You've seen this pattern twice. Figma has worked this way for years: a C++ engine compiled to WebAssembly, drawing through WebGL and now WebGPU. And Raea, the video tool from the last chat, used Blitz, a standalone HTML and CSS engine in Rust, drawing through wgpu: the same idea, built for video.
The rule they all follow: the is easy, the browser does the work for you, but it slows down with a huge number of elements. A is fast at any scale, but then you do everything yourself: layout, text, working out what was clicked, accessibility.
Some claims deserve scepticism. "Every single CSS property" with "full parity with Chrome" is very big: browser teams have spent decades on the edge cases of text, fonts and form controls, so expect gaps a demo video doesn't show.
I was hoping you could give me a rundown again, starting with the context: the web. Not the basics, just context. WebGPU and WebGL: I thought the whole time I was saying WebGL, but I see WebGPU. That's a slip of the mind. What are the differences? What is WebGPU? I'd like a touch on WebGL and the other graphics APIs, to remind myself, and then explain WebGPU and where it comes in. I feel like you've really jumped the gun here. Take it a step back, give me a refresher of what we talked about last time, and then explain what you've done now.
1. Every system has its own graphics API. Apple's is Metal, Microsoft's DirectX, Nintendo's NVN, and Vulkan is the open one used on Linux and Android. Each has its own language: MSL for Metal, HLSL for DirectX, GLSL for OpenGL, the older one that runs everywhere and is mostly being replaced.
On a Mac both translators write Metal, Apple's API, and both shaders are rewritten into MSL, Metal's shader language.
2. Where the browser fits. A website can't call Metal directly: it would be a security risk, and the site would only work on Macs. So the browser offers its own API, the same on every machine, and translates it to the local one behind the scenes. For about ten years that was , a web version of OpenGL ES, the cut-down OpenGL made for phones. That's why your portfolio's shaders are GLSL. In Chrome a translator called ANGLE turns your WebGL calls into Metal calls and your GLSL into MSL: the same job nxnative did with NVN.
3. WebGPU is WebGL's replacement, with the same purpose: let a website use the GPU, safely, on any machine. What differs is what it's modelled on. WebGL copies OpenGL, designed in the 1990s; WebGPU copies the modern APIs, Metal, Vulkan and DirectX 12. WebGL is the web's OpenGL, and WebGPU the web's Metal or Vulkan.
- Shader language: GLSL for WebGL; WGSL, new and made for the web, for WebGPU.
- Translator in Chrome: ANGLE for WebGL; Dawn for WebGPU.
- Good at: drawing, for WebGL; drawing plus general computing on the GPU (AI models, physics, big calculations) for WebGPU.
- Speed: WebGL checks and sets things up again on every . WebGPU has you prepare everything once, then send whole batches of draws together, which is how GPUs work now. So far more can be drawn in each frame.
It's new to every browser. Chrome and Edge have had it since version 113 (2023). Firefox 141 brought it to Windows in July 2025, and version 145 to macOS that November. Safari has it from macOS Tahoe 26 and iOS 26.
4. Where the canvas fits. WebGL and WebGPU both need somewhere to draw: the <canvas> element, a blank rectangle on the page. Setting it up, you pick which API you'll draw into it with: a simple 2D one, WebGL or WebGPU. The canvas is the surface; WebGL and WebGPU are the tools. The other way onto the screen is ordinary HTML and CSS, where you describe what you want and Chrome's engine (Blink to lay it out, Skia to paint it) draws it for you.
5. Back to the post. They want about 7,000 live app screens on one canvas. As ordinary HTML, Chrome would have to handle two million elements, and it can't do that smoothly. So they wrote their own engine in Rust that understands HTML and CSS, doing Blink's and Skia's job, compiled it to WebAssembly so it runs in the page, and draw everything with WebGPU into one canvas. WebGPU rather than WebGL because with millions of elements the cost of each draw adds up, and its batching keeps it down. Raea's wgpu is a Rust library that implements WebGPU, and Firefox uses the same library for its own: WebGPU is both a browser API and a style of graphics programming Rust tools use outside the browser.
Where is OpenGL in this chat? It threw me when I was reading about it, because I couldn't place it in my head.
OpenGL belongs in the same row as the others: it's a graphics API too. It was left out because the row showed the main modern API for each platform, and OpenGL doesn't belong to one platform. It's the old one that ran everywhere. It's easiest to see as two generations.
- OpenGL is from 1992. It isn't owned by one company: it's an open standard run by an industry group called Khronos. For years it was how you wrote graphics code once for Windows, Mac and Linux.
- Platform makers then built their own, faster APIs. Microsoft had DirectX, which most Windows games used. Apple launched Metal in 2014 and deprecated OpenGL on the Mac in 2018: it still runs, frozen.
- Vulkan is OpenGL's official successor, released by Khronos in 2016 with a modern design, and still cross-platform.
- OpenGL ES is the slimmed-down version for phones, and WebGL is built directly on it. WebGL is OpenGL's grandchild, which is why your shaders are GLSL, OpenGL's shader language.
So the left column is where WebGL comes from, and the right is what WebGPU is modelled on. When people call WebGPU WebGL's successor, they mean the web is making the move native apps made about ten years ago.
WebAssembly?
, Wasm for short, is the CPU's side of the story, as WebGPU is the GPU's. For most of the web's history browsers ran one language, JavaScript: fine for most sites, slow for heavy work like a design tool's layout engine. WebAssembly is a second kind of code browsers run, and nobody writes it by hand. You write Rust, C++ or Go, a compiler turns it into a compact .wasm file, and the browser downloads it and runs it close to native speed. Every major browser has supported it since 2017.
This links back to the Switch chat, where the important detail was that the game's code was already Arm64, which the Mac speaks. WebAssembly sidesteps that: it's the instruction set of a pretend CPU that doesn't exist, so a .wasm file isn't tied to any chip. When it loads, the browser translates it into what the machine speaks, Arm64 on a Mac, x86 on most Windows PCs. The same trick ANGLE and Dawn do for graphics: ship one portable version, convert it locally.
In the post, their Rust engine runs on the CPU as WebAssembly and does the thinking: reading the CSS, working out where every box goes, what is on top of what. Then it hands a batch of draw commands to WebGPU, which runs them on the GPU.
- It's still sandboxed. It can't touch your files, the GPU or the page directly; it goes through the browser's APIs, usually via a thin layer of JavaScript.
- It doesn't replace JavaScript. It's for the heavy parts, and the two run side by side.
- Figma is the classic example: C++ compiled to WebAssembly. Photoshop on the web and Google Earth work the same way.
- It isn't only for browsers. Because it's portable and sandboxed, servers use it too: Cloudflare Workers can run it.
So, to see if I understand this well: WebGL or WebGPU, whichever, sits on top of all the graphics APIs we currently have. If we opened a browser on a MacBook, on a Microsoft machine, or, assume for a second we could, on a Nintendo or a PlayStation 5, and opened a page that uses shaders, then on all of those devices there's a converter (I don't remember the name) that transforms the WebGPU API into the specific graphics API of the device the browser is running on.
Yes. One refinement: they don't sit on top of all the APIs at once. Your page always talks WebGL or WebGPU, and on each machine the browser's translator converts it into that machine's API. The names you were after are ANGLE for WebGL and Dawn for WebGPU, in Chrome.
- A Mac: Metal, through ANGLE or Dawn.
- A Windows PC: DirectX, through ANGLE or Dawn.
- Linux and Android: Vulkan or OpenGL.
- A Switch or a PS5, if they ran such a browser: NVN, or Sony's own API.
Shaders are translated too, not only the calls: your GLSL or WGSL is rewritten into the local shader language, MSL on a Mac, HLSL on Windows. And the translators differ between browsers: Chrome uses Dawn for WebGPU, Firefox uses wgpu, and Safari has its own, which only has to target Metal.
The consoles show who does the work. For a browser on a PS5, someone would have to write a translator for Sony's API. If nobody does, the browser can't offer WebGL or WebGPU there, and pages that need them won't work. Your page's code stays the same everywhere; the browser handles the differences.
Could we go back to Figma against an app that uses HTML as its canvas? I want to understand the difference in the structure behind it, now that we've gone through the basics. And tie it back to the first screenshot I sent.
An HTML canvas app. Every shape on the canvas is a real element, a div with CSS, and Chrome lays it out and paints it like any page. It looks exactly as the browser renders it, because it is the browser, it's relatively easy to build, and what you design is already code. What it costs is scale: every element takes memory and layout time. A few hundred frames is fine; thousands of frames with millions of elements is not.
Figma skips HTML. A Figma frame is Figma's own data, not a div. Its C++ engine, compiled to WebAssembly, does its own layout and text and draws everything through WebGL, and now WebGPU, into one canvas. Huge files stay smooth and look the same in every browser. But the design isn't code: auto layout looks like flexbox and is Figma's own version of it, which is why design to code is always a translation.
The post's tool tries for both. Its frames are your app's actual HTML and CSS, so the design is the code; and like Figma it draws them with its own engine into one WebGPU canvas, so it scales. The price is that the engine has to do everything Blink does.
In the screenshot, the grey area with the frames is the WebGPU canvas. The panel on the right (W 296, Fill, Hug, Padding, Grid) is most likely ordinary HTML: Figma does the same, with only the canvas in WebGL and the panels round it normal web interface. The panel's controls map straight to CSS: Fill and Hug are widths, Padding is padding, Grid is CSS grid, and changing them edits real CSS in your codebase. And "every frame runs your full app" means the JavaScript runs, so you can click around inside a frame, which is harder than Figma's job: Figma's frames are still drawings.
I feel like I'm getting more lost than I'm understanding. I think it's because we've opened new terms I haven't really gone through. My understanding ended at WebGL or WebGPU; we can just use one at this point, you don't need to compare every time. Where my knowledge is: I know the browser. On my portfolio, anything using WebGPU or WebGL is just pixels on a canvas. We can do that because WebGL or WebGPU is meant to run on the GPU. That's why it can paint the pixels to make the effects, anything drawn by a shader. That I understand. Now we've opened this topic, and I didn't know there was a lot going on behind the browser. Blink and Skia are things I didn't know before, so they threw a wrench in the works. A pixel is one dot on the screen, and if my portfolio has shader effects, the GPU is drawing all those pixels as the code tells it. When you talk about Blink and Skia, I feel like there are underlying things going on that I don't fully understand.
That's fair: names came faster than they were useful. Back to what you know, plus one idea.
Everything on your screen is pixels, not only the shader. Your portfolio's heading, its links and its images are pixels too, and the GPU puts them on screen the same way. What differs is who decides what colour each pixel should be.
- Your shader: you decide. Your code tells the GPU directly what to paint.
- Your text, links and layout: you don't decide pixel by pixel. You write HTML and CSS, which is a description: a heading, this font, 48 px, centred, 24 px of space below. Something has to turn that description into pixels, and that something is the browser.
Blink and Skia are the names of the two parts of Chrome that do it. Blink is the planner: it reads your HTML and CSS and works out where everything goes and how big it is. The heading is 640 px wide and starts 120 px from the top; the nav sits above it. Skia is the painter: it takes the plan and turns it into pixels, using the GPU.
Both paths end as pixels on the GPU. The left one has Chrome planning and painting for you; the right one skips all that and your shader paints directly. It skips planning because a shader doesn't need it: you aren't saying "put a heading here", you're saying "make this pixel this colour", so there is nothing to measure or arrange.
The post, in one sentence: that team took content that normally goes down the left path, real HTML and CSS from people's apps, and wrote their own planner and painter for it, which paint into a canvas the way your shader does. Chrome never sees 7,000 web pages; it sees one canvas.
Yesss, this was a gap! I wish you had started with this one. Or maybe I wasn't very clear, because I didn't know exactly what to ask; I just knew there was something I was missing. Go back to the post now, with this, and build the knowledge on top of it.
The setup. The product is a design tool whose canvas shows thousands of app screens at once, and every one is a real app made of HTML and CSS: all left-path content.
The problem. Handled the normal way, Chrome's planner would have to plan 7,000 web pages containing two million elements, and plan again every time you zoom, scroll or click. It's built for one page at a time, not thousands.
Their solution. They kept the content but replaced the steps that handle it: their own planner and painter, painting into a canvas the way your shader does. As far as Chrome can tell, the page is mostly one canvas.
The post, line by line.
- "Our WebGPU canvas rendering ~7,000 real HTML/CSS frames": the canvas is the surface at the bottom of the right path, WebGPU the newer WebGL, and "real HTML/CSS" means genuine app code, not pictures of apps.
- "Every frame runs your full app": HTML and CSS are only the look. What a button does is JavaScript, and it still runs; when a click changes something, their planner and painter redo that part.
- "Our own HTML renderer" with "full parity with Chrome": a renderer is the planner and painter together, and parity means its output looks exactly like Chrome's. That's the hard part, after Chrome's thousands of engineers and many years, and there will be gaps.
- "We own the entire pipeline": the pipeline is the chain from code to pixels, the left path. Owning it means doing every step instead of handing some to Chrome. Their bundler, the tool that prepares a project's files before they run, sorts an app's code into a form their engine reads quickly.
- "A mini browser, in Rust, running inside your browser": planning and painting HTML is most of what a browser does, so building your own is building a small browser. Rust can be packaged to run in a page; that's WebAssembly.
- "Two years of infra work": what it takes to rebuild the left path yourself.
Why theirs can be faster. Chrome's planner treats every element as a live object that can be selected, read by screen readers and changed at any moment, and that costs memory and time for each of two million elements. Their engine does only what a design canvas needs: it can skip screens that are off-screen or too small to see when zoomed out, and paint what's left in one batch into the canvas. Figma made the same trade years ago; the difference is that Figma's frames are its own drawings, and this tool's are real HTML and CSS.