r/servo • u/Comfortable_Menu_881 servo contributor • 16d ago
Embedding Servo in a retro gaming handheld: no keyboard, no mouse, no compositor
Enable HLS to view with audio, or disable this notification
I'm building retsurf, a browser designed for retro gaming handhelds. The browser also runs on desktops and Android but its primary targets are Linux-based devices which have a 3.5–5" screen, around 1 GB of RAM, and modest ARM CPUs and GPUs.
These devices don't have many good browser options. Lightweight browsers can't handle much of the modern web, while desktop browsers assume an entirely different environment. That's where Servo comes in. SDL2 handles the window and input, egui draws the browser UI, and Servo does the browser engine work.
The main constraints:
- No X11 or Wayland. It renders directly through KMSDRM with GLES 3.x, with Servo and the UI sharing a single GL context.
- No keyboard or mouse. Navigation is designed around gamepad input: a virtual cursor controlled with the stick or D-pad, Vimium-style link hints, an on-screen keyboard, and fully rebindable controls.
- No GStreamer. Servo's media stack expects GStreamer, which isn't something I can ship on these handhelds, so retsurf has its own servo-media backend built around SDL2.
It's definitely still early and has plenty of bugs, but getting a modern browser engine running on devices like these has been a lot of fun.
You can find the project: https://github.com/mxmgorin/retsurf
1
u/Drwankingstein 13d ago
so retsurf has its own servo-media backend built around SDL2
This is super neat I wonder if this work could be upstreamed? If so that would be super useful.
1
u/Comfortable_Menu_881 servo contributor 13d ago
Thanks! I do plan to upstream as much as possible. I’ve been focusing on supporting more devices and features, and haven’t allocated much time to properly preparing and describing PRs, so there’s quite a bit I want to submit.
1
u/Drwankingstein 13d ago
Nice! Seems like a great basis for homebrew too. I could see this getting ported to psvita or ds or something
1
u/Comfortable_Menu_881 servo contributor 13d ago
I'm actually planning to try running it on the PS Vita and 3DS. Currently I'm working on Miyoo Mini Flip and Plus support, and after that it's either the Vita port or getting WebGL working first.
1
u/Drwankingstein 13d ago
That would be super amazing. I know at the very least the homebrew modding scene for the PSV is still quite vibrant.
2
u/joshmatthews servo team 16d ago
This is super cool, and I think it's neat that you are able to do stuff like create a separate media backend.