Rewriting a Quickshell Desktop Shell in Rust: A Case Study of Memory, Process Architecture, and Engineering Cost on a Single Hyprland Desktop
The status bar is only 33 pixels tall, yet the process behind it held roughly 470 MB RSS and 325 MB PSS. On a laptop with 7.1 GiB of memory, that figure is far from trivial: it determines whether the session can still run a browser, an editor, and several containers at the same time. When the bar's modules were disabled one by one and memory barely changed, the conclusion became clear: the cost lay not in the widgets but in the runtime and the graphics stack beneath them.
This article presents that replacement as a single-case study in journal format. It reports what was measured before and after the Rust rewrite, the process architecture that replaced the old one, the resulting code size, and the price paid to achieve these results. The journal format is used for structural clarity, not as a claim that the article has been peer reviewed.
| Component | Detail |
|---|---|
| Article type | Software engineering case study (experience report with a measurement protocol) |
| Author | Yasril A. Hitho |
| Affiliation | Independent author, BRKH Blog |
| Correspondence | gh+blog@brkh.work |
| Published | 17 November 2026 |
| Manuscript status | Published online on a blog; not a peer-reviewed article |
| Version | 1.0 |
Note on format
This article uses journal format to clarify its structure, not to claim peer review. The author maintains the system under study, so every claim is self-reported. Every figure comes from a measurement recorded on the date stated; figures that cannot be reproduced are marked as observations, not findings.
Abstract
Background. Quickshell allows a desktop shell to be built in QML and reloaded the moment a file is saved, which makes interface iteration very fast. This convenience is paid for by the Qt runtime, the graphics stack, and a QML object graph that remains in memory for the entire session. On a memory-constrained machine, that cost becomes the binding constraint.
Objective. This study addresses four questions: (RQ1) how large the resource cost of the Quickshell shell was before the port; (RQ2) what changed in architecture and resource use after the Rust rewrite; (RQ3) what engineering costs emerged, including code size, iteration speed, and parity gaps; and (RQ4) under what conditions a rewrite of this kind is justified.
Method. A single case study with embedded units was conducted on one Arch Linux and Hyprland desktop. The QML baseline was measured on 13 November 2026 before cutover; the Rust system was measured between 14 and 17 November 2026. The instruments were /proc/<pid>/status and smaps_rollup for RSS and PSS, bench-desktop for whole-session use, rustcast-bench for launcher latency, and PICKER_TRACE for the picker. Code metrics were counted from the archived QML tree and the Rust workspace, and parity gaps were taken from the project documentation.
Results. The bar process fell from roughly 470 MB RSS and 325 MB PSS to 54.6 MB RSS and 25.0 MB PSS on 17 November 2026, with a PSS range of 25–54 MB across earlier measurements. Session RSS fell from 935.0 MB to 792.2 MB, wakeups from 273.2 to 181.1 per second, and session idle CPU from 4.61% to 3.70% of one core. The launcher reached its first frame in 25.6 ms (median; p95 34.1 ms) against a 60 ms budget. The ported scope of 33,581 lines of QML/JavaScript was replaced by 31,652 lines of Rust in 12 crates, so the code is roughly comparable in size and has not grown. The costs were real: hot reload was lost, some earlier behaviour has not yet reached parity, five zombie processes were observed in the bar, and the whole effort took a calendar span of 13–16 November 2026 with LLM-agent assistance.
Conclusion. A rewrite pays off when retained memory is the binding constraint, the ported surface is bounded and testable, and the loss of hot reload can be offset by type checking and test gates. It is not a general prescription: for shells with extensive third-party plugins, or where latency is the main problem, optimizing QML first is likely to be cheaper.
Keywords: Quickshell; QML; Rust; Wayland; Hyprland; case study; resident memory; software rewrite
Highlights
- The QML bar held 325 MB PSS; the Rust bar holds 25–54 MB PSS on the same machine.
- Disabling QML modules did not lower memory use; the cost lay in the runtime and textures.
- Rust is not automatically leaner: the GL path adds about 45 MB PSS, so the Cairo renderer was chosen.
- Code size is comparable, but hot reload is gone and some earlier behaviour has not yet reached parity.
- A port is worth considering when memory is the constraint, not when CPU or latency is the problem.
1. Introduction
1.1 Background
A desktop shell is always-on infrastructure. Unlike an application that is opened and closed as needed, the status bar, OSD, overview, and session menu wait throughout the session, receive events from the compositor, and occasionally draw. Because they are always on, memory that seems small for each widget accumulates into a fixed cost that cannot be traded for time.
Quickshell is a toolkit for building status bars, widgets, lockscreens, and other desktop components with QtQuick [1]. Its working model is attractive: the shell is declared in QML, changes are loaded as soon as a file is saved, and Wayland, Hyprland, PipeWire, and MPRIS integrations are available as built-in types [1]. On this machine, the shell, named hypr-shell, grew into a QML system of about 20,000 lines for the bar alone, plus shared interface components, OSD, overview, session menu, picker, and launcher. The Hyprland IPC consumed by the shell runs over two UNIX sockets: one for requests and one for events [4].
The problem was not CPU. In the 13 November 2026 measurement, the bar process used about 0.1% CPU at idle. The problem was retained memory: roughly 470 MB RSS and 325 MB PSS, of which 267 MB was private anonymous memory. Part of this cost came from the graphics stack: libLLVM and libgallium accounted for about 160 MB RSS when the GL path was active. When the bar's modules were disabled one by one, memory moved only within noise. This indicates that the expensive component was not the widgets but the runtime, textures, and scene graph beneath them.
1.2 Problem Statement
QML-level optimization had been attempted before the rewrite: the network panel was deleted, overlays were turned into one-shot processes, and unused modules were no longer built. These measures did not shift the constraint. At that point, only two options remained: accept the memory cost or replace the runtime.
The software engineering literature offers a sound warning against the second option. A rewrite discards knowledge buried in the old code, opens the door to the second-system effect, and often produces a larger system than the one it replaces [13]. However, that warning is general. What practitioners need is measured evidence from a real case: how much was actually saved, how much was actually paid, and under what conditions the trade is worthwhile.
1.3 Research Questions
- RQ1. How large was the resource use of the Quickshell shell before the port, and which components accounted for it?
- RQ2. What changed in process architecture and resource use after the shell was rewritten in Rust?
- RQ3. What engineering costs emerged, including code size, iteration speed, quality, and parity gaps?
- RQ4. Under what conditions is rewriting a QML shell in Rust justified, and what should be measured before deciding?
1.4 Contributions
This article makes four contributions: (i) a before-and-after measurement set from a real machine, with the method and dates stated explicitly; (ii) a description of the process architecture that replaced one resident QML process with one resident bar and six one-shot programs; (iii) an explicit cost record, including parity gaps and newly introduced defects; and (iv) a five-criterion decision framework for choosing between a port and QML optimization.
1.5 Organization of the Paper
Section 2 presents the theoretical background and related work. Section 3 describes the methodology. Section 4 reports the results. Section 5 discusses their meaning and offers the decision framework. Section 6 states the implications for practice, Section 7 discusses threats to validity, and Section 8 concludes.
2. Theoretical Background and Related Work
2.1 Quickshell, QML, and the Process Model
Quickshell provides QML types for Wayland surfaces, panels, and desktop integrations, and loads the configuration file as a single QML object tree [1]. QML itself is a declarative language for Qt Quick: properties are bound to expressions, and a property change triggers an update [2]. Qt Quick renders that tree through a scene graph, which by default uses the graphics path and keeps textures and buffers in process memory [3].
The process model is simple and convenient: a single qs process hosts the entire shell. Notifications, the StatusNotifierItem tray, MPRIS, PipeWire, UPower, and the image picker all live in the same process. As a consequence, the peak cost of every component accumulates and is never released while the session runs. One-shot overlays can be split into separate processes, but the main bar remains the container for all state.
2.2 Memory as the Constraint
Two memory metrics are often confused. RSS counts the pages mapped into a process, including shared libraries that are also mapped into other processes. PSS divides shared pages proportionally among the processes that use them, which is closer to the real cost [15]. Summing RSS across all processes counts the Qt, GTK, Mesa, and LLVM libraries many times over. For this reason, PSS is the figure used here to decide whether a change actually saved memory [15].
On a 7.1 GiB machine, the practical limit is not whether one process fits but how many other processes can run before swap comes into use. A bar holding 325 MB PSS consumes about 5% of physical memory, whereas a bar holding 25–54 MB consumes about 1%. This order-of-magnitude difference is what turns the question "QML or Rust" from a matter of preference into an engineering decision.
2.3 Reimplementation, Aging, and Technical Debt
Lehman formulated that a system that continues to be used will continue to grow in complexity unless work is deliberately done to reduce it [11]. Parnas described software aging as the result of uncontrolled change and a lack of understanding of the code being changed [12]. Both explain how the QML shell reached its current state: every new panel added an object tree, every integration added resident state, and no step reduced the runtime's baseline cost.
Brooks distinguished essential from accidental complexity [13]. Rewriting in Rust removes some accidental complexity, namely the QML runtime, the QML engine, and the heavy graphics stack. It does not remove essential complexity: Wayland protocols, Hyprland IPC, the tray, notifications, and behavioural parity must still be handled. Brooks also warned about the second-system effect, in which the author of a rewrite is tempted to add features that were previously rejected. Both warnings frame the discussion of costs in Section 5.
Technical debt offers a more operational frame: a rewrite repays part of the old debt with new debt [14]. The question is not whether debt exists but whether the new debt, in the form of dependency versions, parity gaps, and process defects, is cheaper to maintain than the old. This case study attempts to answer that question with numbers rather than language preference.
3. Research Methodology
3.1 Case Study Design
This is a single case study with embedded units, following the guidelines for conducting and reporting case study research in software engineering [10]. The case is the migration of one desktop from a QML-based Quickshell shell to a Rust-based theshell. The embedded units are the bar, launcher, picker, and overlays. Because the author designed and evaluated the change, the study is closer to action research than to a controlled experiment. Every claim is therefore self-reported and is discussed further in Section 7.
3.2 Context and Units of Analysis
The context is a single machine: a laptop with 7.1 GiB of memory and a Ryzen 3 5300U, running Arch Linux and Hyprland 0.57.1. There is no control group, no second machine, and no other user. The work took place between 13 and 16 November 2026, with 115 commits in the merged repository history. This figure is a calendar span, not a measure of human hours: most of the work was done with an LLM agent, so human effort cannot be separated from session time.
3.3 Baseline and Measurement Protocol
The QML baseline was taken on 13 November 2026, before cutover, while the qs -c hypr-shell process was still running. RSS was read from /proc/<pid>/status and PSS from /proc/<pid>/smaps_rollup. Post-port measurements were taken between 14 and 17 November 2026 using the same procedure for the bar process. Session figures were obtained from bench-desktop, which sums session process RSS, CPU, and context switches per second and compares them with baseline.json. The tool reports failure if RSS rises by more than 5% or CPU by more than 0.5%.
Three limitations of the procedure must be stated at the outset. First, the QML baseline is a single observation that cannot be repeated, because Quickshell is no longer run and its old configuration has been archived. Second, PSS depends on how many other processes share a page, so its value can shift between sessions without any code change. Third, the QML CPU figure (0.1%) was recorded ad hoc and does not use the same sampling window as the Rust CPU figure (60 seconds), so the two must not be compared directly.
3.4 Code and Process Metrics
Code size was counted from the archived QML tree and from the Rust workspace. For QML, lines were counted in .qml and .js files; for Rust, in every .rs file across 12 crates, including test modules. The ported scope is defined as the components that have a counterpart under crates/: the bar, Ui/, Commons/, OSD, overview, openwith, session, picker, launcher (thecast), and the bang table. Components without a counterpart in the Rust workspace are not counted, so the comparison covers only the parts that were actually replaced.
Quality metrics were taken from the project gate: cargo fmt --all -- --check, cargo clippy --workspace --all-targets -- -D warnings, cargo test --workspace, and a private D-Bus test for the bar. The test count is the number of #[test] attributes at the measured revision. It is a static measure, not the number of tests executed on every commit. Parity gaps were taken from the project's parity documentation.
3.5 Author Role and Ethics
The author maintains theshell and wrote the QML configuration that it replaced. There are no human participants, no personal data, and no intervention on anyone else's system. Because the author is evaluating their own work, Section 7 states the threats to validity explicitly, including the risk that the successes of a port are easier to see than its costs.
4. Results
4.1 The Quickshell Baseline
Before the port, the QML bar consisted of 44 modules and 25 panels, with 20,179 lines of QML in bar/ alone. Ui/ added 5,292 lines and Commons/ added 1,919 lines. The qs process hosted notifications, the tray/SNI, MPRIS, PipeWire/UPower, and the image picker, all of which remained active for the entire session.
The 13 November 2026 measurement recorded roughly 470 MB RSS, 325 MB PSS, and 267 MB of private anonymous memory, with idle CPU around 0.1%. libLLVM and libgallium accounted for about 160 MB RSS when the GL path was active. When bar modules were disabled one by one, memory moved only within noise. In other words, no QML configuration could bring memory use back to a reasonable level while the same runtime remained in use.
4.2 theshell Architecture
theshell [17] is a Rust workspace with 12 crates and seven programs: topbar, osd, overview, openwith, session, picker, and rustcast. Two interface stacks are used deliberately. Six programs use GTK4 through gtk4-layer-shell, with a Layer::Top surface for the bar and Layer::Overlay for overlays [5][8]. The rustcast launcher uses no toolkit: it creates a layer-shell surface directly through smithay-client-toolkit, paints with tiny-skia, and lays out text with cosmic-text [6][7].
The process model is the most important architectural change. Only topbar is resident, started by topbar.service with Restart=always. Every other program is one-shot: the first call starts a serve process, later calls in the same burst are forwarded over a socket, and the process exits when its window closes. Panels and toasts opened by the bar are also one-shot processes, so panel memory is released when they close. Nothing polls while idle: the bar collects state from pollers and event sockets [4] and redraws only when a sample changes.
Two technical decisions show that Rust is not a single remedy. First, the bar forces GSK_RENDERER=cairo because the GL/Vulkan path adds about 45 MB PSS from libLLVM and Mesa, pushing the bar to about 92 MB. Second, every GTK program calls prepare_gdk() to set GDK_DEBUG=no-portals, because without it GDK waits about 25 seconds for each missing portal interface at login. Both are forms of accidental complexity that moved from Qt to GTK rather than disappearing.
The compatibility contract is preserved: binary names, $XDG_RUNTIME_DIR/{topbar,osd,...}.sock sockets, configuration paths, caches, and systemd units are unchanged. Existing keybindings, scripts, and .desktop files continue to work, so the cutover can be reversed by re-enabling the Quickshell unit.
4.3 Memory, CPU, and Wakeups
Table 1. Resource measurements before and after the port.
| Metric | Quickshell (QML) | theshell (Rust) |
|---|---|---|
| Resident process | qs -c hypr-shell | topbar |
| RSS | ~470 MB (13 Nov 2026) | 54.6 MB (17 Nov 2026); 78–91 MB recorded (15 Nov) |
| PSS | ~325 MB (13 Nov 2026) | 25.0 MB (17 Nov 2026); 41–54 MB recorded (14–15 Nov) |
| Private memory | ~267 MB anonymous | 11.2 MB Private_Dirty (17 Nov 2026) |
| PSS, GL path | ~325 MB | ~92 MB |
| Idle CPU | ~0.1% (recorded ad hoc) | 0.62% of one core over 60 seconds (17 Nov 2026) |
Session RSS (bench-desktop) | 935.0 MB (12 Nov 2026) | 792.2 MB (14 Nov 2026) |
Session CPU (bench-desktop) | 4.61% | 3.70% |
Session wakeups (bench-desktop) | 273.2 ctx/s | 181.1 ctx/s |
Bar PSS fell by a factor of 6–13 and RSS by a factor of 5–9, depending on which measurement is used for comparison. The session figure fell by 15%, less than the bar, because session RSS sums shared pages and because the 12 November baseline includes other changes, among them the polkit agent swap and the portal fix. The session figure should therefore be read as an indication of direction, not as single-cause proof.
The Rust idle CPU figure (0.62%) appears higher than the QML figure (0.1%), but the two were measured with different instruments: the QML figure was recorded ad hoc, whereas the Rust figure is a 60-second average that includes one clock update and several pollers. All that can be concluded is that both are low; CPU was not the reason for the port, and the port did not meaningfully improve it. The 34% drop in session wakeups is more meaningful: a process that does not exist cannot wake the CPU.
4.4 Latency and Interaction Load
The rustcast launcher was measured with rustcast-bench, which records the time from exec to the first frame. Over five runs, the median was 25.6 ms and the p95 was 34.1 ms, against a 60 ms budget. The earlier GTK prototype recorded 144 ms to first frame, so the direct Wayland path with wl_shm and software rasterization gave roughly a fivefold improvement. Project notes also contain figures of 16 ms and ~19 ms from different instruments. This article uses the rustcast-bench result as its primary figure and records the discrepancy as a threat to validity.
The picker shows the same pattern, together with its cost. With 33 wallpapers and a warm cache, the surface appeared in 123 ms, the first frame arrived in 59 ms, and all images finished within 244 ms. With eight 4K images and an empty cache, the surface appeared in 140 ms, the first thumbnail in 217 ms, and everything finished within 783 ms. By comparison, the QML picker used a 450 ms debounce before warming, kept every decoded tile alive, and ran md5sum and stat on each file.
However, the first Rust version was not automatically better. Profiling found that a full-width first draw could take about 298 ms because each tile entering focus was decoded synchronously on the UI thread. It also found that ten right-arrow presses raised RSS from 141 MB to 163 MB because decoded pixbufs were never released. The fix consisted of bounded decoding, a warming queue that follows the arrow direction, and buffer release. Without this profiling work, the claim that Rust is faster would not have become true.
4.5 Code Size, Dependencies, and Quality
Table 2. Engineering metrics before and after the port.
| Metric | Quickshell (QML) | theshell (Rust) |
|---|---|---|
| Ported-scope lines of code | 33,581 lines of QML/JS | 31,652 lines of Rust (86 files, 12 crates) |
| Process model | 1 resident process + one-shot overlays | 1 resident bar + 6 one-shot programs |
| UI stack | Qt 6 / Qt Quick | GTK4 0.11.5 + gtk4-layer-shell 0.8.1; launcher on Wayland + tiny-skia |
| Launcher, first frame | 144 ms (GTK prototype) | 25.6 ms median; p95 34.1 ms (60 ms budget) |
| Picker, warm open of 33 images | 450 ms debounce + md5sum/stat per file | 123 ms mapped; 59 ms first frame; 244 ms complete |
| Automated tests | none found in the QML tree | 217 #[test] attributes; fmt, clippy, test, D-Bus gates |
| Hot reload | yes, changes load when the file is saved | no; compilation required (Makepad Relax evaluated) |
| Artefacts | QML sources + shared Qt runtime | bar 4.0 MB; launcher 7.4 MB; utilities 0.8–0.9 MB |
The ported scope of 33,581 lines of QML/JavaScript was replaced by 31,652 lines of Rust. The ratio is about 94%: the rewrite neither inflated the codebase nor shrank it dramatically. What changed was the nature of the code. QML declares the UI, whereas Rust manages surfaces, the event loop, child processes, and protocols explicitly.
The workspace pulls in 258 packages from Cargo.lock. This number is large, but most are transitive GTK and Wayland dependencies; the resulting binaries are small: bar 4.0 MB, launcher 7.4 MB, and utilities 0.8–0.9 MB. The project gate runs fmt, clippy with -D warnings, workspace tests, and a private D-Bus test. At the measured revision there are 217 #[test] attributes; release notes mention 172 tests at an earlier commit, so the number has grown with the fixes.
4.6 Parity Gaps and New Defects
Parity is not a claim that all earlier behaviour has been matched. According to the parity documentation, the control panel is only partial (no settings editor), Bluetooth does not scan for devices, the traffic meter and microphone meter are absent, IME and AT-SPI are not supported, the tanzaku picker style has not been rewritten, and the narrow-screen responsive layout is still marked "todo". The OSD also differs in opacity and glyph size.
New defects have also appeared. On 17 November 2026, the bar process had five child kill processes that had become zombies, because the code calls Command::new("kill").spawn() without waiting for completion. The impact is small, consisting of process-table entries that are never reaped, but it shows that once the QML runtime is gone, process housekeeping remains a manual responsibility. The rewrite moved debt; it did not eliminate it.
5. Discussion
5.1 What Was Gained
The largest gain is reduced retained memory. At 25–54 MB PSS, the Rust bar holds 6–13 times less PSS than the QML bar. On a 7.1 GiB machine, the freed space is equivalent to several GTK applications. The second gain is process isolation: one-shot panels and toasts cannot bring down the bar, and panel memory is released when they close. The third is lower wakeups and a much faster launcher. The fourth concerns maintenance: three workspaces that previously duplicated the palette, Hyprland client, IPC protocol, and logging are now a single workspace with one implementation of each. The fifth is type checking: protocol and state errors that previously surfaced at runtime are now compile-time errors [9].
5.2 What Was Paid
The first cost is the loss of hot reload. Quickshell loads changes as soon as a file is saved [1], whereas Rust requires compilation and linking before a change becomes visible. The project tried Makepad Relax as a replacement for the edit-run cycle, but it did not replace the production workflow. In interface work dominated by pixel adjustments, this loss is keenly felt.
The second cost is parity. As noted in Section 4.6, the control panel is only partial, Bluetooth does not scan for devices, and several other behaviours have not yet reached parity. The memory comparison in Section 4 measures the ported components; features that have not reached parity are not reflected in that figure.
The third cost is new accidental complexity: renderer choice, the GDK portal delay, layer-shell surface management, and child processes. The fourth is profiling work that does not show up in code size: the picker's 298 ms bug and the pixbuf leak were found by tracing, not by compilation. The fifth is schedule: the 13–16 November 2026 span with 115 commits was possible only because of LLM-agent assistance; without it, the human calendar cost would be far larger and is not measured here. The sixth is new debt in the form of zombie processes and documentation that drifts from the code.
5.3 When a Port Makes Sense
Table 3. A five-criterion decision framework.
| Criterion | Port to Rust | Optimize QML first |
|---|---|---|
| Primary constraint | High retained memory (PSS), low CPU | CPU, latency, or behaviour bugs dominate |
| Surface | Bounded, parity testable per component | Broad, including third-party plugins |
| Iteration | Hot reload is not the main working tool | Hot reload is used daily |
| Dependencies | QML/Qt runtime is heavy and hard to trim | Configuration is already lean |
| Resources | Time exists to close parity gaps | No budget for parity work |
The rule is simple: consider a port only if the first three criteria point to "port", and budget explicitly for the last two. If memory use is high but the porting surface is unbounded, for example because third-party plugins must be retained, then QML optimization, module reduction, and splitting overlays into one-shot processes are the cheaper first step. In this case, those steps had already been tried and had failed to move the baseline cost, which is what made the port rational.
5.4 Relation to the Literature
This case supports the reading of Lehman and Parnas: the QML shell aged not because of one large mistake but because features kept being added on top of the same runtime [11][12]. Brooks explains why the rewrite succeeded on some dimensions and not on others: the accidental complexity of the runtime was removed, while the essential complexity of protocols and parity remained and moved into Rust [13]. In the language of technical debt, the port repaid memory debt with parity and housekeeping debt [14]. Whether that trade is favourable depends on the relative cost of each, not on the programming language itself.
The empirical contribution of this case is a measured separation of costs: on one machine, the QML runtime accounted for most of the bar's PSS, while the UI modules accounted for almost none. Without that measurement, the decision to port would rest on an impression that QML is heavy. With it, the decision can be stated plainly: this runtime holds 325 MB PSS and cannot be trimmed through configuration.
6. Implications for Practice
- Measure PSS, not only RSS. RSS sums shared pages and makes cross-session comparisons misleading.
smaps_rollupgives a figure closer to the real cost [15]. - Try reducing QML before replacing it. Remove unused panels, split overlays into one-shot processes, and measure again. If memory does not move, the runtime becomes the prime suspect.
- Define the parity contract before writing code. A list of the components, behaviours, and features that must exist makes "done" testable and guards against the second-system effect [13].
- Budget for the loss of hot reload. Replace it with a fast compile cycle, automated tests, and inspection tools; do not treat the loss as free.
- Keep names and paths. Preserving binary names, sockets, configuration, and systemd units makes the cutover reversible and reduces migration cost for users.
- Instrument from the start. Memory, first-frame latency, and wakeups should be gate metrics, not a one-off measurement at the end.
7. Limitations and Threats to Validity
Construct validity. RSS, PSS, CPU, and wakeups are proxies, not user experience. PSS depends on how many processes share pages, so the 25.0 MB and 54.1 MB figures recorded on different days may reflect session state rather than code change. The number of #[test] attributes is not the number of tests run, and line count is not a measure of complexity; both are proxies, not a complete quality model [16].
Internal validity. There is no control group. The QML baseline was measured once, cannot be repeated, and its method is not documented as thoroughly as that of the Rust measurements. The session figure of 935.0 → 792.2 MB includes other changes made in the same period, namely the polkit agent swap and the portal fix, so it is not single-cause proof. The QML and Rust CPU figures were also measured with different instruments.
External validity. This is one case, one machine, one author, and one Hyprland configuration. The results cannot be generalized to desktops with a different GPU, multiple monitors, or a broader plugin set. Readers who cite a specific figure should verify it against the primary source and on their own machine.
Reliability. The author maintains the system and is evaluating their own work. There is an unconscious incentive to emphasize the memory success and understate the parity cost. The parity gaps and the zombie defect are reported to reduce that bias, but they do not remove it. The 13–16 November 2026 development span also does not measure human effort, because the work was done with an LLM agent.
Figures that cannot be verified. Build time was never recorded. Launcher latency has three values from different instruments (16 ms, ~19 ms, and 25.6 ms); this article uses the rustcast-bench result and flags the discrepancy. The 470 MB RSS / 325 MB PSS figure is a single observation that cannot be reproduced without running a second QML shell in the same session.
8. Conclusion
Rewriting hypr-shell as theshell resolved a problem that configuration could not: the QML runtime held hundreds of megabytes of PSS that did not shrink when modules were disabled. After the port, the resident bar fell to 25–54 MB PSS, the session to 792.2 MB RSS, and wakeups by 34%, and the launcher reached its first frame in 25.6 ms (median). Code size is comparable and has not grown.
The costs are also measurable: hot reload is gone, some earlier behaviour has not yet reached parity, and the rewrite introduced a housekeeping defect of its own. The 13–16 November 2026 calendar span was made possible by LLM-agent assistance and cannot be read as ordinary human cost.
The conclusion is not that Rust is better than QML. It is that a rewrite pays off when retained memory is the binding constraint, the ported surface is bounded and testable, and the loss of hot reload can be offset by type checking and test gates. Outside those conditions, QML optimization, module reduction, and one-shot process separation remain the cheaper first step.
Declarations
Use of generative AI. The reported system was built in sessions with an LLM agent, and this manuscript was drafted with the assistance of a generative AI system. The author is responsible for verifying every figure, citation, and claim against the primary sources and measurement records.
Conflict of interest. The author maintains theshell, the system evaluated in this article. Readers should treat the results as self-reported.
Funding. No external funding was received.
Data availability. The theshell repository is private; measurement records and the relevant technical documents can be made available to reviewers on request. The main measurement commands are listed in Appendix A.
Ethics statement. Not applicable; this study did not involve human participants.
How to cite this article
Hitho, Y. A. (2026). Rewriting a Quickshell desktop shell in Rust: A case study of memory, process architecture, and engineering cost on a single Hyprland desktop. BRKH Blog. https://blog.brkh.work/en/posts/porting-quickshell-ke-rust
References
[1] Quickshell. (2026). Quickshell 0.3.2 documentation. https://quickshell.org/docs/v0.3.2/types
[2] Qt Group. (2026). QML applications. https://doc.qt.io/qt-6/qmlapplications.html
[3] Qt Group. (2026). Qt Quick performance considerations. https://doc.qt.io/qt-6/qtquick-performance.html
[4] Hyprland. (2026). IPC. https://wiki.hypr.land/IPC
[5] Wayland. (2026). wlr-layer-shell-unstable-v1 protocol. https://wayland.app/protocols/wlr-layer-shell-unstable-v1
[6] DeVault, D. (n.d.). The Wayland Protocol. https://wayland-book.com/
[7] Smithay. (2026). smithay-client-toolkit. https://docs.rs/smithay-client-toolkit/
[8] gtk-rs. (2026). GTK 4 bindings for Rust. https://gtk-rs.org/
[9] The Rust Project. (2026). The Rust Programming Language. https://doc.rust-lang.org/book/
[10] Runeson, P., & Höst, M. (2009). Guidelines for conducting and reporting case study research in software engineering. Empirical Software Engineering, 14, 131–164. https://doi.org/10.1007/s10664-008-9103-7
[11] Lehman, M. M. (1980). Programs, life cycles, and laws of software evolution. Proceedings of the IEEE, 68(9), 1060–1076. https://doi.org/10.1109/PROC.1980.11805
[12] Parnas, D. L. (1994). Software aging. In Proceedings of the 16th International Conference on Software Engineering (pp. 279–287). https://doi.org/10.1109/ICSE.1994.296781
[13] Brooks, F. P. (1987). No silver bullet: Essence and accidents of software engineering. Computer, 20(4), 10–19. https://doi.org/10.1109/MC.1987.1663532
[14] Kruchten, P., Nord, R. L., & Ozkaya, I. (2012). Technical debt: From metaphor to theory and practice. IEEE Software, 29(6), 18–21. https://doi.org/10.1109/MS.2012.167
[15] Linux kernel documentation. (2026). proc(5): /proc filesystem, smaps_rollup. https://docs.kernel.org/filesystems/proc.html
[16] ISO/IEC. (2023). ISO/IEC 25010:2023: Systems and software Quality Requirements and Evaluation (SQuaRE) — Product quality model. International Organization for Standardization.
[17] Hitho, Y. A. (2026). theshell [Computer software]. Private repository.
Appendix A. Measurement Protocol
The following commands were used to measure the bar on 17 November 2026. PSS is read from smaps_rollup; its value depends on other processes sharing pages.
# RSS, PSS, and private memory of the bar process
pid=$(pgrep -x topbar)
rg '^(Rss|Pss|Private)' /proc/$pid/smaps_rollup
# Idle CPU over 60 seconds, as a percentage of one core
hz=$(getconf CLK_TCK)
read -r _ _ _ _ _ _ _ _ _ _ _ _ _ u1 s1 _ < /proc/$pid/stat
sleep 60
read -r _ _ _ _ _ _ _ _ _ _ _ _ _ u2 s2 _ < /proc/$pid/stat
awk -v a="$u1" -v b="$u2" -v c="$s1" -v d="$s2" -v hz="$hz" \
'BEGIN { printf "%.2f%%\n", ((b-a)+(d-c))/hz/60*100 }'
Whole-session use was measured with bench-desktop (RSS, CPU, and context switches per second), which compares its result with baseline.json. Launcher latency was measured with rustcast-bench --runs 5 --budget 60, and the picker with PICKER_TRACE=1, which writes the mapped, scan, and first-frame times, plus every draw above 16 ms, to $XDG_CACHE_HOME/theshell/picker.log.
BRKH Blog