"Just because you can doesn't mean you should." Wise advice I once got that I didn't follow. I like chasing problems that are quite difficult. Since 2024 I've wanted to be able to run a browser inside my browser. I know you could just do an iframe but I wanted to see if it was possible to render webpages inside webpages without that.
I knew Rust would be helpful here because of it's WASM compatibility. But it still required a lot of legwork to get it to work: DOM parsing, CSS layout, rendering, this all had to come together.
It's still not a true browser, it's missing a ton of features, but just rendering a webapge without using the DOM was fascinating to me.I learned coding it about Rust and WebGPU. Maybe it will be helpful for someone elses projects.
pdufour•1h ago
I knew Rust would be helpful here because of it's WASM compatibility. But it still required a lot of legwork to get it to work: DOM parsing, CSS layout, rendering, this all had to come together.
I started out using cheerpx which can run any x86 binaries, but couldn't find any browsers that would compile to that. So I abandoned that. I then moved onto using Servo (rust browser's engine) and its libraries like https://github.com/servo/stylo. https://github.com/DioxusLabs/blitz brought it all together and rendered pages via https://github.com/linebender/vello.
It's still not a true browser, it's missing a ton of features, but just rendering a webapge without using the DOM was fascinating to me.I learned coding it about Rust and WebGPU. Maybe it will be helpful for someone elses projects.
Check it out! https://github.com/pdufour/browserbrowserbrowser