Show HN: Can we have Flutter-like portability without the bloated web binaries?
The plan is to use C++ as the intermediate layer. For desktop and mobile, I want to use Skia combined with a layout library to translate HTML/CSS sizing and transformations into something Skia can draw. This ensures the UI stays pixel-perfect across platforms.
However, the "Flutter approach" to the web has always bothered me. Shipping a 2MB+ Skia binary just to render a basic landing page feels redundant when the browser already has a world-class rendering engine. It results in massive bundles and a canvas-only UI that breaks basic browser expectations like SEO, text selection, and accessibility.
With Coi, I want to split the strategy: on the web, it stays lean by using the browser’s native HTML/CSS and JS glue. On native platforms, it uses the C++/Skia stack. You get the same codebase and the same visual output, but the web build doesn't suffer from "canvas bloat".
Right now, I’m still focused on the web target and refining the core language specs, but the server target is next on the roadmap. I'm curious if this "hybrid rendering" approach, native elements for web, Skia for desktop/mobile, is something others have found success with, or if I'm underestimating the difficulty of keeping the layout engines perfectly synced.
I'd love some feedback on the language design or the architectural plan.
4 comments
[ 3.1 ms ] story [ 25.3 ms ] threadWith all that said, since you mention flutter, which despite continuing rumours about it's demise, is established and extremely popular; what would make me drop flutter for this?
I'm not being flippant, it's a genuine question.
For me if it's smaller, faster, easily to learn (darts and excellent language, flutter is a lot more complicated), and quicker to write and deploy I'd use it.
If you’ve used Vue or React, Coi will feel much more familiar. It’s a component-based model where your logic, styles, and markup live together, but you get strict static typing and native-speed performance via WASM.
The goal is a true "write once, run everywhere" workflow. On the web, it stays light by using the browser's engine. For mobile and desktop, the plan is to map that same HTML/CSS styling and component logic to a native C++/Skia backend. You get a native app's performance without losing the web's layout flexibility.
Beyond that, the 'Canvas-only' approach is computationally expensive. You are effectively re-implementing a rendering engine (layout, hit-testing, paint) on top of a rendering engine. While the browser's native DOM/CSS engine is a highly optimized, hardware-accelerated C++ powerhouse, a Canvas-only app has to manually calculate every pixel and handle every event in the WASM/JS loop. This drains battery faster and runs hotter than letting the browser do what it was built for.