News for hackers. Stuff that matters.
Re:Servo is now available on crates.io by simonw on Monday April 13, 2026 @11:11AM (#47753172)
Here's a vibe-coded "servo-shot" CLI tool which uses this crate to render an image of a web page: https://github.com/simonw/research/tree/main/servo-crate-exp...

  git clone https://github.com/simonw/research
  cd research/servo-crate-exploration/servo-shot
  cargo build
  ./target/debug/servo-shot https://news.ycombinator.com/
Here's the image it generated: https://gist.github.com/simonw/c2cb4fcb15b0837bbc4540c3d398c...
Re:Servo is now available on crates.io by scrame on Monday April 13, 2026 @11:57AM (#47753955)
That's pretty cool. I'm guessing it would need some tweaking to handle things like cookies, or does it just need a pointer to the cookiejar? I'm not too familiar with servo,
Re:Servo is now available on crates.io by simonw on Monday April 13, 2026 @02:28PM (#47756063)
It's a VERY simple initial demo, I expect things like cookies would require quite a lot more work.
Re:Servo is now available on crates.io by echelon on Monday April 13, 2026 @11:21AM (#47753316)
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.)

Re:Servo is now available on crates.io by minimaxir on Monday April 13, 2026 @11:42AM (#47753661)
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

Re:Servo is now available on crates.io by mnutt on Monday April 13, 2026 @04:24PM (#47757367)
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.
Re:Servo is now available on crates.io by ospider on Monday April 13, 2026 @10:35PM (#47760590)
> there are just too many features dependent on the full Chrome stack

Do you mind elaborating on what features are missing?

Re:Servo is now available on crates.io by simonw on Monday April 13, 2026 @11:22AM (#47753340)
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.

Re:Servo is now available on crates.io by lastontheboat on Monday April 13, 2026 @06:16PM (#47758645)
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...).
Re:Servo is now available on crates.io by mrbonner on Monday April 13, 2026 @05:04PM (#47757798)
Cool! I checked the source and noticed that even LLM prefers simplified, high level Rust coding styles: use value types such as String, use smart pointers such as reference counting, clone liberally, etc… instead of fighting the borrow checker gatekeepers.

It is the style I prefer to use Rust for. Coming from Python, Typescript and even Java, even with this high level Rust, it yields incredible improvement already.

Re:Servo is now available on crates.io by andrepd on Monday April 13, 2026 @05:47PM (#47758262)
> Cool! I checked the source and noticed that even LLM prefers simplified, high level Rust coding styles: use value types such as String, use smart pointers such as reference counting, clone liberally, etc… instead of fighting the borrow checker gatekeepers.

Yeah that tracks because the AI is dumb as a bag of bricks. It can apply patterns off stackoverflow, but can hardly understand the borrow checker.

Re:Servo is now available on crates.io by ghusbands on Tuesday April 14, 2026 @03:38AM (#47762499)
I wonder why most of the "g" characters are cropped.
Re:Servo is now available on crates.io by stefs on Tuesday April 14, 2026 @06:33AM (#47763755)
good catch