24 ms·
Servo is now available on crates.io
- nicoburns 6mo agoSome notes: - The docs.rs docs are still building, but the docs from the recent RC are available [0] - The Slint project have an example of embedding Servo into Slint [1] which is good example of how to use the embedding API, and should be relatively easy to adapt to any other GUI framework which renders using wgpu. - Stylo [2] and WebRender [3] have both also been published to crates.io, and can be useful standalone (Stylo has actually been getting monthly releases for ~year but we never really publicised that). - Ongoing releases on a monthly cadance are planned [0]: https://docs.rs/servo/0.1.0-rc2/servo https://docs.rs/servo/0.1.0-rc2/servo [1]: https://github.com/slint-ui/slint/tree/master/examples/servo https://github.com/slint-ui/slint/tree/master/examples/servo [2]: https://docs.rs/stylo https://docs.rs/stylo [3]: https://docs.rs/webrender https://docs.rs/webrender
- apitman 6mo agoTangent, but Slint is a really cool project. Not being able to dynamically insert widgets from code was the only thing that turned me off of it for my use case.
- Tmpod 6mo agoAgreed, I find Slint really interesting. To me, the biggest pain point is the very limited theming support. It's virtually impossible to make a custom theme without re-implementing most widget logic, which is a shame.
- Talderigi 6mo agoIs Servo production-ready enough to replace or embed alongside engines like WebKit or Blink?
- bastawhiz 6mo agoIt depends on your use case. I wouldn't use it for a JS-heavy site. But if you have simple static content, it's probably enough. It's worth testing it out as a standalone app before integrating it as a library.
- mayama 6mo agoIt doesn't crash as often as it used to few years ago. JS heavy sites might not work, and layout issues too. And internet gatekeepers cloudflare turnstile doesn't work.
- andriy_koval 6mo agowhy did it crash? Rust is supposed to be memory safe?..
- nablaxcroissant 6mo agocrashes happen for reasons besides memory safety. web-engines are crazy complicated pieces of software and crashes could happen for any number of reasons. also I would be shocked if this was written using purely safe rust
- mkl 6mo agoThe JS engine is SpiderMonkey, which is C++.
- 9fwfj9r 6mo agoIt's a great move. The early development of Rust aimed to support Servo. However, it's still disappointing that the script engine uses SpiderMonkey, which is purely C++.
- tialaramex 6mo agoI mean SpiderMonkey works, and presumably is fairly self-contained, so I can see why replacing that isn't attractive unless you believe you can make it significantly better in some way.
- drzaiusx11 6mo agoIt's best not to try and eat the elephant in one bite, which is perhaps where this project went wrong initially. Maybe this is a symptom of learning from past mistakes rather than a flaw.
- saghm 6mo agoMy understanding is that the original intent of Servo was to be a way to develop features and port them over to Firefox itself (which did happen with at least a few features), and the relatively slower pace of developer is more due to Mozilla laying off everyone who was working on it. (Yes, presumably many of the same people are involved, but I would expect that being able to work on something full time without needing another source of income will end up making progress faster than needing to find time outside of work and balance between other things in life, ideally in a way that avoids burnout).
- drzaiusx11 6mo agoMy understanding was that from day one the desire was to make a complete "web rendering & layout engine" and only pivoted to shipping smaller sub-components like Stylo (stylesheets) when it appeared to be "taking too long." I followed the project from the early days through the layoffs, but I may be misremembering things.
- 6mo ago
- phaistra 6mo agoIs there a table of implemented RFCs? Something similar to http://caniuse.com http://caniuse.com where we can see what HTML/JS/CSS standards and features are implemented? If it exists, I can't seem to find it. Closest thing seems to be "experimental features" page but its not quite detailed enough.
- jszymborski 6mo agoClosest is perhaps the web platform tests https://servo.org/wpt/ https://servo.org/wpt/
- that_lurker 6mo agoTheir bloghas monthly posts on changes https://servo.org/blog/ https://servo.org/blog/
- lastontheboat 6mo agohttps://doc.servo.org/apis.html https://doc.servo.org/apis.html is auto-generated from WebUDL interfaces that exist in Servo. It's not great but better than nothing.
- lastontheboat 6mo agoOh, I forgot that https://arewebrowseryet.com/ https://arewebrowseryet.com/ exists for this too!
- sebsebmc 6mo agoThere's a lot of work between the WPT team and web-features/web-features-mapping that should allow this to work automatically based on WPT results.
- diath 6mo agoToo little too late now that the new meta is to use system provided webviews so you don't have to ship a big ass web renderer per app.
- swiftcoder 6mo agoNo particular reason Servo couldn't one day become the system web view on Linux distros...
- mort96 6mo agoYeah the closest thing you come today is arguably WebKitGTK, which is known for being not exactly great.
- chrismorgan 6mo agoLinux (GNU/Linux or whatever) doesn’t even have the concept of a system web view. The closest you might get to the notion is probably WebKitGTK which is perhaps the GNOME idea of a system web view, but it’s nothing like WebKit on macOS or WebView2 (or MSHTML in the past) on Windows for popularity or availability. As a user of a desktop environment other than gnome-shell, I only have webkitgtk-6.0 installed because I chose to install Epiphany—it’s a good proxy for testing on Safari, which Apple makes ridiculously expensive.
- bastawhiz 6mo agoSystem web views were available as drag and drop components in VB6 two and a half decades ago. There's nothing "new" about that as a concept, and plenty of reasons to not want to use Blink/WebKit.
- diath 6mo ago> System web views were available as drag and drop components in VB6 two and a half decades ago. There's nothing "new" about that as a concept We are in a thread discussing a Rust library, logically, I was referring to the current approach in GUI rendering in the Rust space (such as Tauri and Dioxus). > and plenty of reasons to not want to use Blink/WebKit. Such as? Can you name a few objective reasons against Blink/WebKit (the technology) that does not involve just not liking Google/Apple?
- phplovesong 6mo agoDid firefox drop servo? I recalled they where in the progress of "rewrite in rust"?
- dralley 6mo agoFirefox incorporated parts of the Servo effort which were able to reach maturity. Stylo (Firefox's current CSS engine) and Webrender (the rendering engine) and a few other small components came from the Servo project. Most other parts of Servo were not mature enough to integrate at the time Mozilla decided to end support for the project and didn't look like they would be mature enough any time soon. The DOM engine for example was in the early stages of being completely rewritten at the time because the original version had an architecture that made supporting the entire breadth of web standards challenging. Keep in mind that you can continue adding Rust to Firefox without replacing whole components. It's not like Mozilla abandoned the idea of using more Rust in Firefox just because they stopped trying to rewrite whole components from the ground up.
- alarmingfox 6mo agoI think they implemented parts of it into their Gecko engine. But they laid of all the Servo development team in like 2020 I believe. Only recently when it moved over to the Linux Foundation has Servo started being worked on again
- andruby 6mo agoYes, during the layoff of August 2020 Mozilla laid off the full Servo team, but never publicly announced this afaik. Wikipedia includes it here: https://en.wikipedia.org/wiki/Firefox#cite_ref-120 https://en.wikipedia.org/wiki/Firefox#cite_ref-120
- Sammi 6mo agoMozilla can't help it but be their own worst enemy. Ladybird may well never have happened if Mozilla just had kept working on Servo, and Ladybird is most definitely going to out compete Firefox when it reaches maturity, as Mozilla keeps on burning bridges with open source enthusiasts.
- apitman 6mo ago> As you can see from the version number, this release is not a 1.0 release. In fact, we still haven’t finished discussing what 1.0 means for Servo Wait, crate versions go up to 1.0? EDIT: Sorry, while crate stability may be an interesting conversation, this isn't the place for it. But I can't delete this comment. Please downvote it. Mods feel free to delete or demote it.
- mort96 6mo agoThe fundamental problem with Rust versioning is that 0.3.5 is compatible with 0.3.6, but not 0.4.0 or 1.0.0; when major version is 0, the minor takes the role of major and patch takes the role of minor. So packages iterate through 0.x versions, and eventually, they reach a version that's "stable". If version 0.7 turned out to hit the right API and not require backward incompatible changes, releasing a version 1.0 would be as disruptive as a major version change to your users and communicate through version semantics that it is a breaking change. Semver declares that version 0.x is for initial development where there is no stability guarantee at all. This is the right semantics for a versioning system, but Cargo doesn't follow this part of semver. Providing stability guarantees throughout the 0.x cycle inevitably results in projects getting stuck in 0.x. This is one of my biggest gripes with Cargo. But Rust people seem to universally consider it a non-issue so I don't think it'll ever be fixed.
- moron4hire 6mo agoPersonally, I think the 0 major version is a bad idea. I hear the desire to not want to have to make guarantees about stability in the early stages of development and you don't want people depending on it. But hiding that behind "v0.x" doesn't change the fact that you are releasing versions and people are depending on it. If you didn't want people to depend on your package (hence the word "dependency") then why release it? If your public interface changes, bump that major version number. What are you afraid of? People taking your project seriously?
- mort96 6mo agoVersioning is communication. I find it useful to communicate, through using version 0.x, "this is not a production ready library and it may change at any time, I provide no stability guarantees". Why might I release it in that state? Because it might still be useful to people, and people who find it useful may become contributors.
- grimgrin 6mo agowhen servo is ready i have plans to swap it into qutebrowser which ive been growing fonder of
- solomatov 6mo agoWhat this crate could be used for?
- aerzen 6mo agoFor converting HTTP URLs into interactive images of the webpage. In other words: an internet browser.
- simonw 6mo agoHere'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-exploration/servo-shot 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/c2cb4fcb15b0837bbc4540c3d398c65d?permalink_comment_id=6096875#gistcomment-6096875 https://gist.github.com/simonw/c2cb4fcb15b0837bbc4540c3d398c...
- echelon 6mo agoThis 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 6mo agoIt 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 6mo agoI 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 https://crates.io/crates/chromiumoxide
- mnutt 6mo agoI 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.
- rafaelmn 6mo agoThis should be the real benchmark of AI coding skills - how fast do we get safe/modern infrastructure/tooling that everyone agrees we need but nobody can fund the development. If Anthropic wants marketing for Mythos without publishing it - show us servo contrib log or something like that. It aligns nicely with their fundamental infrastructure safety goals. I'd trust that way more than x% increase on y bench. Hire a core contributor on Servo or Rust, give him unlimited model access and let's see how far we get with each release.
- mort96 6mo agoWe do not need vibe-coded critical infrastructure.
- falcor84 6mo agoAs I see it, the focus should not be about the coding, but about the testing, and particularly the security evaluation. Particularly for critical infrastructure, I would want us to have a testing approach that is so reliable that it wouldn't matter who/what wrote the code.
- mort96 6mo agoI disagree. Thorough testing provides some level of confidence that the code is correct, but there's immense value in having infrastructure which some people understand because they wrote it. No amount of process around your vibe slop can provide that.
- px43 6mo agoThat's just status quo, which isn't really holding up in the modern era IMO. I'm sure we'll have vibed infrastructure and slow infrastructure, and one of them will burn down more frequently. Only time will tell who survives the onslaught and who gets dropped, but I personally won't be making any bets on slow infrastructure.
- falcor84 6mo ago
- tusharkhatri369 6mo agoSounds great, would use the crate from now on. its more convenient that way
- givemeethekeys 6mo agoSo, since this is the top post on Hacker News, and the website's description is a bit too high level for me, what does Servo let me do? By "web technologies", does it mean "put a web browser inside your desktop app"?
- caminanteblanco 6mo agoIt's an alternative browser engine, vis a vis Ladybird
- swiftcoder 6mo agoSpecifically, it's the browser engine that spun out of Mozilla's early efforts towards a rust-based browser, and is one of the motivating projects for the entire Rust ecosystem
- tvshtr 6mo agois ladybird embeddable?
- 01HNNWZ0MV43FF 6mo agoYes, Servo is an embeddable web browser / webview, like Chromium Embedded Framework. (CEF) Electron = Node.js + CEF Tauri = Rust + webview Tauri has an experimental branch to use Servo to provide a bundled webview. Currently it relies on a system-level webview, like Edge on Windows, Safari on MacOS, and webkit-gtk on Linux.
- givemeethekeys 6mo agoThank you!
- tracker1 6mo agoI was a little curious to see if there was any Tauri integration, and it looks like there is (tauri-runtime-verso) ... Not sure where that comes out size-wise compared to Electron at that point though. My main desire there would be for Linux/flathub distribution of an app I've been working on.
- giovannibonetti 6mo agoFor those of you using a browser to generate PDFs, the Rust crate you should look into is Typst [1]. Regardless of your application language, you can use their CLI. It takes some time to get used to their DSL to write PDFs, but nowadays with AI that shouldn't take too long. [1] https://crates.io/crates/typst https://crates.io/crates/typst
- andai 6mo agoI keep hearing about this one as a LaTeX alternative. I shall have to take a proper look.
- okanat 6mo agoTypst is what Rust is to C++ but for Latex. Saner syntax, well thought extensibility (including scripting and macros), tables that are sane, a package manager. I am happy that I switched to it for documentation purposes. I am looking forward to compiling web pages with it too.
- realityking 6mo agoJust used it to automate some reporting today. Claude Code worked pretty well though sometimes I had to point it to Typst docs to understand what I wanted.
- globular-toast 6mo agoI recently deployed typst to generate PDF letters automatically. Being familiar with (La)TeX (I've typeset everything from letters to my PhD thesis), I was shocked at the speed. It's quick enough to use in an HTTP request cycle. The language was also super easy to learn. Not sure if it's quite as good as TeX at typesetting, but it seems good enough. When I did my thesis, TikZ was even more valuable. I don't know if there's any replacement for that.
- z3ratul163071 6mo agowe've come full circle. they've invented rust to do servo with it.
- hybirdss 6mo agofeels like we're actually getting new browser engines this decade and it's kind of strange
- t43562 6mo agoServo has been on-the-go for a while though. It hasn't been a lightning speed development, it's just getting a bit more visible.
- nmvk 6mo agoReally excited to see this. I contributed to Servo open source 10 years ago, and it was a very cool experience.