Remix.run Logo
echelon 2 days ago

This is super useful! I have immediate use for this.

Do you know if Servo is 100% Rust with no external system dependencies? (ie, can get away with rustls only?)

Can this do Javascript? (Edit: Rendering SPAs / Javascript-only UX would be useful.)

Edit 2: Can it do WebGL? Same rationale for ThreeJS-style apps and 3D renders. (This in particular is right up my use case's alley.)

simonw 2 days ago | parent | next [-]

It depends on stuff like SpiderMonkey so not pure Rust.

It should be able to render JavaScript but I've seen it throw bugs on simple pages, no doubt because my vibe-coded thing is crap not because Servo itself can't handle them.

minimaxir 2 days ago | parent | prev | next [-]

I have been building/vibecoding a similar tool and unfortunately came to the conclusion that in practice, there are just too many features dependent on the full Chrome stack that it's just more pragmatic to use a real Chromium installation despite the file size. Performance/image generation speed is still fine, though.

In Rust, the chromiumoxide crate is a performant way to interface with it for screenshots: https://crates.io/crates/chromiumoxide

ospider 2 days ago | parent | next [-]

> there are just too many features dependent on the full Chrome stack

Do you mind elaborating on what features are missing?

mnutt 2 days ago | parent | prev [-]

I think you could in theory have a similar webkit-based stripped down headless crate that might have a good tradeoff of features, performance, and size.

lastontheboat 2 days ago | parent | prev [-]

Servo does execute JS and does support webgl (and some but not all of webgl2 if you enable the feature: https://book.servo.org/design-documentation/experimental-fea...).