I've been thinking about this lately: Writing a rendering engine for WASM or something, which then draws to a canvas.
The rendering engine can then be shipped along with the actual UI.
Sure, the rendering engine will take some time to load. However, compiling styling etc. to WebGL instructions at build time might also speed things up considerably.
(The actual reason, however, I'd be interested in this is not performance but improving upon the developer experience and replacing CSS with something better.)
To keep in mind, à la longue, the best CSS is probably no CSS. Does a user really need all these buttons and dropdowns, modals and scrollable containers, or do they need only an input and a container rendering a few paragraphs, an image, a video/audio, possibly a 3D model.
I see no problem if instead of using all these web sites/applications with such a plethora of visual and experience spam, I just have a single input box connected to an agent through which I interact with them all, letting the APIs settle in the background.
Furthermore, concepts such as file systems, operating systems, networking protocols, and so on, are probably terrible abstractions, just the fact that a 10 year old printer is pretty much unusable with a "modern" operating system or that a VFD shipped yesterday from the factory can be rendered useless due to a single byte error in the Modbus connection ought to give second thoughts to anyone daring to call themselves an engineer.
The rendering engine can then be shipped along with the actual UI.
Sure, the rendering engine will take some time to load. However, compiling styling etc. to WebGL instructions at build time might also speed things up considerably.
(The actual reason, however, I'd be interested in this is not performance but improving upon the developer experience and replacing CSS with something better.)