Browserception in Rust (WASM and WebGPU)(github.com) |
Browserception in Rust (WASM and WebGPU)(github.com) |
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
Nice project - how did you like working with Servo ?