Skip to content

Seg/rust lean overhaul - #8

Merged
SegMind25 merged 9 commits into
claude/vigilant-mendel-d96n55from
seg/rust-lean-overhaul
Oct 20, 2026
Merged

SegMind25 merged 9 commits into
claude/vigilant-mendel-d96n55from
seg/rust-lean-overhaul

Conversation

@SegMind25

Copy link
Copy Markdown
Owner

No description provided.

Sizes come from CI run 48 (4ca2f45): ISO, rootfs, installed size and the
largest packages of both editions. The bloat table lists what each item
costs, why it is bloat and what is done about it; product decisions are
listed separately and not acted on.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
…image

From the 19 October build report (installed size): linux-zen-headers
325 MiB, opencv 113 MiB (only spectacle needs it), plus the legacy
xorg-server and xf86 driver stack and a third system-information tool.

- Setup downloads the running kernel's headers with the NVIDIA DKMS
  driver, the only thing that builds modules. The kernel package comes
  from the pkgbase file of the running kernel.
- The artools library patch that reads the kernel version from
  /usr/lib/modules now applies to every kernel: the stock one no longer
  has headers to read it from.
- The desktop has its own screenshots, so spectacle goes; both sessions
  are Wayland, so the X stack becomes xorg-xwayland, as in Lite.
- Five packages listed twice are listed once.
- cupsd is no longer enabled by default (live session and Setup); the
  packages stay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
A workspace of its own (release profile: opt-level z, LTO, panic=abort,
stripped; about 550 KiB) with the crate segctl and the binary seg. One
dependency, lexopt.

- seg info: distro, kernel, init, uptime, RAM, packages, disk.
- seg svc list|enable|disable|start|stop: OpenRC, runit, dinit and s6,
  detected from PID 1, /run, then the installed files.
- seg clean: orphans, pacman cache beyond the newest 2 versions (a port
  of libalpm's vercmp), rotated logs, ~/.cache size. Dry run by default.
- seg tune light|balanced|performance: vm sysctls, CPU governor, I/O
  scheduler per disk type; saved to /etc/sysctl.d/99-seg.conf.
- seg zram on|off|status: zstd swap in memory, half the RAM.
- seg doctor: failed services, missing firmware, low disk space, a stale
  db.lck, a broken keyring, each with its fix.

Root is checked up front, unwrap/expect/panic/indexing are compile errors
outside tests, output ends quietly on a closed pipe. 77 unit tests cover
every parser and the file-writing parts against a fake /sys, /proc, /etc.
Also run in an Artix container: info, doctor, clean, tune, zram status,
svc against the real dinit layout.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
- pkg/segctl: PKGBUILD, install script (enables seg-zram and seg-tune,
  choosing the init by what is installed, so it works in the build's
  chroot), Makefile. Ships seg, the services for OpenRC, runit and dinit,
  the balanced profile and the weekly fstrim job.
- build-in-container.sh builds it from tools/seg into the same local
  [seglinux] repository; both profiles list segctl; check-packages.sh and
  online-packages.sh know it is built locally.
- Setup enables seg-zram and seg-tune on every installation, and no longer
  cupsd (installed, not started).
- zram-setup (run by udev at module load) hands over to seg zram on when
  seg is installed, so systems updated before segctl keep their zram.
- Fixes a stale path in a comment of the fstab code, and the swap
  partition test now looks for the fstab line instead of the word zram.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
…itions

- /etc/makepkg.conf.d/10-seglinux.conf sets MAKEFLAGS="-j$(nproc)" (the
  generic x86-64 code generation stays, no -march=native).
- udev-ioschedulers.rules: the KERNEL globs (sd[a-z]*, nvme[0-9]*n[0-9]*)
  also matched partitions, which have no queue/scheduler to write, so
  udev logged an error for every partition. Only whole disks are matched
  now, and virtual disks (vd*, xvd*) get none like seg tune sets, since
  their host does the scheduling. Checked with udevadm verify.

pacman.conf already has Color and ParallelDownloads = 5.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
Rust command-line tools from the Artix repositories (no AUR), chosen
because each is small and replaces a daily habit:

- ripgrep (rg) searches folders far faster than grep -r and skips what
  .gitignore skips; fd finds files by name without find's syntax.
- eza is ls with colors and git status (aliased as ll and la only);
  zoxide gives z, which jumps to the folder you use most.

They add a few MiB (the next build report gives the exact figure) against
the 438 MiB the earlier commits take off (linux-zen-headers 325.1 MiB and
opencv 112.8 MiB, from the 19 October build report, plus the X server).
Not added, with reasons in docs/lean-audit.md: bat, dust, bottom, procs
and sd (they replace nothing that is installed), helix (a runtime of
grammars next to nano), alacritty (the terminal is the maintainers'
call), zellij, sudo-rs.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
- A seg job: cargo fmt --check, clippy with -D warnings (with and without
  the test cfg, so the unwrap/expect ban is enforced), tests, and the
  release binary's size in the job summary. It fails if seg gains a
  dependency besides lexopt.
- udevadm verify on data/system/*.rules.
- A package may be listed only once per profile and init; the five repeats
  this found in the full profile are gone.
- shellcheck also covers zram-setup (it was missing), the seg services,
  the weekly fstrim script, segctl.install and rust-tools.bashrc.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
…audit

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
Builds both editions on seg/rust-lean-overhaul without publishing
anything (the ISO workflow cannot be started from here), lists what the
system image contains and does not contain, and boots Lite in QEMU, logs
in on a text console and runs seg. Removed again once the branch has been
checked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0119819Vrp5vJojQCT1CjWog
@vercel

vercel Bot commented Oct 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
seglinux Ready Ready Preview Oct 20, 2026 8:17pm UTC

@SegMind25
SegMind25 merged commit 994c839 into claude/vigilant-mendel-d96n55 Oct 20, 2026
20 checks passed

This branch was successfully deployed

1 active deployment
Preview — 57a1b1f5 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants