wayland.fyi minimalist wayland special interest group
wayland.fyi: Minimalist Wayland Special Interest Group
wayland.fyi Home of minimalist wayland special interest group. Many have claimed that wayland ‘sucks’, the goal of this site is to not only promote and make alternative wayland software which fits the label of ‘minimalist’, but also to disprove many of the claims people make against wayland.
wayland.fyi 是极简主义 Wayland 特别兴趣小组的家园。许多人声称 Wayland “很烂”,本站的目标不仅是推广和开发符合“极简主义”标签的替代性 Wayland 软件,还要反驳人们对 Wayland 的诸多指责。
smaller wayland
更小的 Wayland
wayland at its core is a very simple wire protocol, nothing more, the default implementation sits at just around ~10k lines of code, what is big is what is made on top of it, which usually in mainstream wayland is some sort of compositor library based around GLES or vulkan (although pixman backend is sometimes offered it is a second-class citizen), bringing in such big rendering pipelines always results in complex, messy systems that are impossible to understand for mere mortals, or a buttload of protocol extensions, or an xdg-desktop-portal, whatever the hell that is.
Wayland 的核心只是一个非常简单的传输协议,仅此而已。其默认实现仅约 1 万行代码。真正庞大的是构建在它之上的东西——在主流 Wayland 中,通常是某种基于 GLES 或 Vulkan 的合成器库(尽管有时提供 pixman 后端,但它属于二等公民)。引入如此庞大的渲染管线,总是会导致系统变得复杂、混乱,让凡人无法理解,或者引入一大堆协议扩展,又或者是 xdg-desktop-portal,鬼知道那是什么东西。
we are offering an alternative, it might not be perfect, but we found omitting ‘modern’ renderers and some features to be good enough for our workflow, similarly much of the insanity surrounding freedesktop can be ignored simply by not implementing certain protocols or ‘wayland’ features. a list of Wayland.fyi Approved ™ software is available at the bottom of the page.
我们提供了一种替代方案,它可能并不完美,但我们发现省略“现代”渲染器和某些功能对于我们的工作流程来说已经足够了。同样,通过不实现某些协议或“Wayland”功能,可以忽略围绕 freedesktop 的许多疯狂之处。页面底部提供了“Wayland.fyi 认证™”软件列表。
the case of wlroots
关于 wlroots
wlroots kinda sucks… but what are the issues? there are a couple: it’s big. huge, even. brings in a lot of badly designed and overly large protocol extensions. wlroots is extremely linux-centric: it is hard to get working on minimalist Linux distros without udev. when statically linked causes symbol conflicts with sway (to be fair this is an issue on sway’s side) because of its udev dependency and requirement for seat management, it does not work natively on BSD, and needs “compatibility shims” (read as shitty hacks). our compositor library neuswc works natively on all BSDs, without shitty hacks.
wlroots 有点烂……但问题出在哪里呢?有几个方面:它很大,甚至非常庞大。它引入了许多设计糟糕且过于臃肿的协议扩展。wlroots 极其以 Linux 为中心:在没有 udev 的极简 Linux 发行版上很难运行。当静态链接时,由于其对 udev 的依赖和对 seat 管理的需求,会导致与 sway 的符号冲突(公平地说,这是 sway 那边的问题)。它无法在 BSD 上原生运行,需要“兼容性垫片”(即糟糕的黑客手段)。我们的合成器库 neuswc 可以原生运行在所有 BSD 上,无需任何糟糕的黑客手段。
wlroots is fast moving and unstable: hobby projects like dwl are left unmaintained due to developers not being able to keep up with changes. wlroots is fairly low level: good for some use cases, a bit (a lot) of a pain for people to make their own compositors easily, which is why wayland has a lot less options than X on that front.
wlroots 迭代极快且不稳定:像 dwl 这样的业余项目因为开发者无法跟上变化而被弃置。wlroots 处于相当底层的水平:虽然适合某些用例,但对于想要轻松制作自己合成器的人来说,它非常(极其)痛苦,这就是为什么 Wayland 在这方面的选择比 X 少得多的原因。
some interesting talk and work that could potentially make wlroots suck a fair bit less (while not solving the fact that it’s overengineered): udev discussion (archived) a pr making udev optional (rejected) static linking discussion NOTE: despite claiming to be “60,000 lines of code you were going to write anyway.” it is closer to 80k and swc proves even then it is not true :P TL;DR it could be worse, but it could be also way better
一些有趣的讨论和工作可能会让 wlroots 稍微不那么烂(虽然不能解决它过度设计的问题):udev 讨论(已归档)、使 udev 可选的 PR(被拒绝)、静态链接讨论。注:尽管声称是“你无论如何都要写的 6 万行代码”,但实际上接近 8 万行,而且 swc 证明即使那样也不是真的 :P 总之:情况可能更糟,但也可以好得多。
the case of X11
关于 X11
All graphics on UNIX are bad, that’s because modern UNIX is barbaric technology, but X11 is the worst offender of being barbaric. full X11 stack is millions of legacy lines of code, workarounds, and wasn’t even a good design in theory. they made a library called libXfixes. when you need a library just for fixes you know it’s bad. or libXfont2… Xorg is so old they made a sequel to the font library! Have you ever tried to look at its source code? it is best you don’t…
UNIX 上的所有图形技术都很糟糕,因为现代 UNIX 本身就是野蛮的技术,而 X11 是其中最野蛮的罪魁祸首。完整的 X11 堆栈包含数百万行遗留代码和权宜之计,在理论上甚至都不是一个好的设计。他们做了一个叫 libXfixes 的库。当你需要一个专门用于“修复”的库时,你就知道它有多烂了。还有 libXfont2……Xorg 太老了,以至于他们不得不为字体库制作续集!你试过看它的源代码吗?最好别看……
Essentially (for better or worse) it’s not the 1990s anymore. X11 client code often looks simpler because there is a lot that you do not see (nor do you want to), and even more which you will never use. Wayland makes what you do more explicit rather than relying on crusty abstractions (and boy, are they crusty). X11 is the antithesis of small, minimalist software.
本质上(无论好坏),现在已经不是 1990 年代了。X11 客户端代码看起来通常更简单,因为有很多东西你看不见(也不想看见),还有更多你永远不会用到的东西。Wayland 让你的操作更加明确,而不是依赖于陈旧的抽象(天哪,它们真是太陈旧了)。X11 是小型、极简软件的对立面。
misinformation
误区
Often in discussions around wayland vs X, various weird, wonderful, and incorrect claims appear, this disproves them, you can link directly to any of the sections below
在关于 Wayland 与 X 的讨论中,经常会出现各种奇怪、美妙且不正确的说法。本节将反驳它们,你可以直接链接到下方的任何部分。
“Wayland being composited by default is bad”
“Wayland 默认进行合成处理是很糟糕的”
Compositing is not fancy animations or transparency, in effect it usually means drawing just what you need, where you need. X11 Compositors are separate from the X server, runs as a client, redirects all windows into offscreen pixmaps, and re-draws with effects or v-sync. On wayland, there is no unified server. the compositor is the server. it handles all drawing, input management, and compositing the final scene. Although the same word is used, compositing on X and Wayland are not the same thing!
合成(Compositing)并不是指花哨的动画或透明效果,实际上它通常意味着只在你需要的地方绘制你需要的东西。X11 合成器与 X 服务器分离,作为客户端运行,将所有窗口重定向到离屏位图,并带有特效或垂直同步进行重绘。在 Wayland 上,没有统一的服务器。合成器就是服务器。它处理所有的绘图、输入管理和最终场景的合成。虽然用的是同一个词,但 X 和 Wayland 上的合成完全不是一回事!
“X11 is minimal/good/better than Wayland”
“X11 是极简的/好的/比 Wayland 更好”
Here’s a quote about X from 1998, just to illustrate how not only is it not good, it was actually never good! (此处省略 1998 年关于 X 的讽刺语录列表) let me add one more: X-Windows: …Begging for replacement since 1998. See also: The case of X11
这里有一段 1998 年关于 X 的引言,用以说明它不仅现在不好,而且从来就没好过! ……让我再加一条:X-Windows:……自 1998 年以来一直乞求被取代。另请参阅:关于 X11 的案例。
“Wayland and X11 are similar in any way”
“Wayland 和 X11 在任何方面都很相似”
very false, the whole model is fundamentally different. X11 is a network-transparent unified server with window management and…
大错特错,整个模型从根本上就是不同的。X11 是一个具有网络透明度的统一服务器,包含窗口管理和……