Vinix – A modern operating system written in V

Hacker News by 15 min read 2x views
Vinix – A modern operating system written in V

Share Post

Brand caller Vinix desktop situation built successful V and V UI2

100 MB RAM
usage connected boot

≈1 GB of disk
abstraction aft install

Official support of
Apple Silicon Macs

Compatible with
Alpine Linux binaries

M3, M4, M5 support coming soon.

Alpha software. Vinix is nether progressive improvement and is not intended for regular aliases accumulation usage yet.

Run Vinix successful QEMU

Install the build prerequisites, past fto the launcher build and commencement the desktop.

Apple Silicon Macs

QEMU uses macOS hardware virtualization for the ARM64 desktop.

brew instal qemu git clone https://github.com/vlang/vinix cd vinix ./run-desktop-aarch64.sh

Other computers

Use the x86_64 launcher. It uses KVM erstwhile available, different QEMU emulation.

git clone https://github.com/vlang/vinix cd vinix ./run-desktop-amd64.sh

Vinix successful action

Features

Vinix uses a mini fraction of a modern machine's representation and disk RAM ON BOOT — 100 MB DISK AFTER INSTALL — 1 GB BOOT TO DESKTOP — SECONDS NO GC · NO SYSTEMD · NO TELEMETRY

Speed and performance

Vinix boots to a desktop successful seconds and settles astatine astir 100 MB of RAM and 1 GB of disk. That is the full system, not a stripped-down mode you move into.

The kernel has nary garbage collector. It is built pinch -gc nary and manual memory management, truthful nary postulation walk tin extremity a strategy call, an interrupt handler, or the compositor astatine a infinitesimal of its ain choosing. Memory usage stays level alternatively of sawtoothing while the instrumentality stays up.

Nothing runs that you did not start. There is nary systemd, nary inheritance indexer, and nothing phoning home. The desktop draws consecutive to the framebuffer and composites its own windows, pinch nary show server underneath it, and the instrumentality feels the aforesaid on day ninety arsenic it did connected time one.

A sandboxed exertion cannot scope the filesystem extracurricular its ain directory SANDBOX (OPTIONAL) REST OF THE SYSTEM /home ~/.ssh other apps

Optional per-app sandboxing

An exertion tin beryllium started successful a sandbox, the measurement apps are confined connected iOS. A sandboxed programme gets its ain backstage directory and that is each of the filesystem it can see. Your documents, your SSH keys, different applications' data, and the remainder of the system are simply not location for it, truthful a bug aliases a bad dependency wrong that program cannot publication what it was ne'er given.

This is optional and disconnected by default. It is thing you move connected for the programs you choose, not a wall the strategy puts betwixt you and your ain computer. Run the same binary without a sandbox and it behaves for illustration immoderate different Unix process, pinch the usual file permissions and thing other successful the way.

It is meant for the cases wherever it really helps: a browser, a downloaded binary you have not read, a build book from personification else's repository. Your ain devices keep running precisely arsenic they do now.

Alpine Linux binaries telephone the Vinix kernel straight done Linux strategy calls ALPINE AARCH64 BINARY ELF musl chromium blender VINIX KERNEL VFS SCHEDULER MEMORY DRIVERS openat mmap futex ioctl NO VM · NO CONTAINER · NO EMULATION

Full compatibility pinch Linux syscalls and Alpine Linux binaries

Vinix is not a Linux distribution. The kernel is written from scratch successful V. But a Linux programme does not really talk to Linux, it talks to a fixed, numbered interface: openat, mmap, clone, futex, and a few 100 much strategy calls. Vinix implements that interface, positive the ELF layout and the musl behaviour those programs expect connected entry.

So an unmodified aarch64 Alpine Linux package runs present natively. There is nary Linux virtual machine, nary compatibility container, and nary CPU emulation successful that path: the binary executes connected the bare CPU, and its strategy calls onshore successful the Vinix kernel. pkg instal chromium pulls the aforesaid package Alpine ships, and it starts.

That is why Chromium, GIMP, Blender, Sublime Text, Gnumeric, and Wine already tally on Vinix: thousands of existing packages alternatively of a fistful ported by hand. Applications that request Linux kernel features Vinix has not implemented yet tin still fall short, and those gaps are closed arsenic they are found.

The Apple M1 AGX GPU driver, presently successful development APPLE M1 — AGX GPU

M1–M5 GPU drivers

Apple publishes nary archiving and nary driver for its GPUs extracurricular macOS, truthful any other operating strategy that wants hardware acceleration connected a Mac has to constitute one. Vinix is penning its own, starting pinch the M1.

On M1 that intends 2 drivers: AGX, the GPU itself, and DCP, the show controller that owns the screen. Both are coprocessors reached complete Apple's mailbox and RTKit interfaces, pinch the DART IOMMU keeping the GPU's position of representation abstracted from the kernel's. Above them sits a minimal DRM subsystem pinch GEM buffer objects, implementing only what those 2 drivers request to allocate, share, and coming frames, with Mesa and OpenGL connected apical truthful applications get existent acceleration alternatively of software rendering.

This is the activity successful advancement correct now, and overmuch of the remainder depends connected it: a hardware-accelerated desktop, soft video, and yet games done Wine. M2 through M5 travel aft M1 is finished. Their GPUs are adjacent capable relatives that the same driver grows to screen them alternatively than starting over.

What Vinix is about

Use the surface well

No other padding aliases rounded corners. More room for your work.

One measurement to do things

One distro, UI, package manager, init system, and binary format. No request to make changeless choices. And it each conscionable works.

Change what you need

Customize the strategy to activity the measurement you want.

Themes you tin choose

Pick from galore themes. You tin make it look for illustration macOS Catalina aliases moreover Windows XP.

Uses fewer resources

Uses astir 100 MB of RAM astatine startup and 1 GB of disk space.

Stays small

Vinix stays mini and minimal. It will not get much bloated pinch each release.

Apple Mac lineup pinch MacBook Air, MacBook Pro, iMac, Mac mini, and Mac Studio

Officially supported hardware

Vinix initially is going to support each Apple Silicon Mac (only M1 Macs for now arsenic of Sep 10 2026).

Support for Intel Macs, backmost to the 2010 Mac mini, is next. So you tin springiness an older Mac a fast, modern, afloat supported OS.

The full stack is built and tested together. No hunting for drivers aliases workarounds for sleep, wake, lid closing, hibernation, Wi-Fi, graphics, audio, aliases the different hardware basics that excessively often move a Linux instal into a project.

You tin besides already instal Vinix connected an amd64 machine, but the driver support won't beryllium great. Better to tally it successful a VM.

Frequently asked questions

Why Vinix complete macOS?

This is the main logic Vinix exists: to connection a fast, unfastened source, minimal operating system for MacBooks. Apple builds fantabulous hardware, and location was nary lightweight system built specifically for it.

macOS gets slower and much bloated pinch each release. The aforesaid Mac that felt instant when you bought it feels sluggish a fewer updates later, and the strategy now takes tens of gigabytes of disk and gigabytes of RAM earlier you unfastened a azygous app. Releases person also become little stable, pinch questionable creation choices, settings that get rearranged or removed, features cipher asked for, and much of the strategy tied to online accounts and services.

Vinix goes the different way. It starts successful astir 100 MB of RAM and 1 GB of disk, boots in seconds, and stays that way. The full strategy is unfastened source, truthful you tin publication immoderate part of it, alteration it, and rebuild it yourself. Nothing phones home.

There is besides gaming. Vinix is going to move your powerful Mac into a gaming machine. Apple Silicon has the GPU for it, but the games are not there: astir publishers skip macOS entirely, and the ports that do beryllium get dropped. For example, Valve ended macOS support for Counter-Strike 2. Vinix is going to support celebrated titles that have nary macOS version, including The Witcher 3, Counter-Strike 2, Elden Ring, Grand Theft Auto V, Red Dead Redemption 2, Skyrim, Doom Eternal, and Hogwarts Legacy.

That is planned activity alternatively than thing you tin play today. It builds connected 2 pieces that already tally here: Wine, which runs Windows applications connected Vinix, and a user-mode x86 translator layer, which runs x86-64 binaries connected ARM64 hardware. The remaining piece is the Apple GPU driver activity now successful progress.

Why Vinix complete Linux?

Fewer reasons here. Linux is simply a bully system, and if it useful for you location is nary request to switch.

What Vinix offers is minimalism and a strategy without systemd. There is 1 measurement to do things: 1 distribution, 1 desktop, 1 package manager, 1 init system, 1 binary format. Nothing to take aliases configure earlier you tin commencement working.

And there's the entreaty of a caller kernel. Vinix is not different distribution connected apical of Linux, it's a kernel written from scratch and mini capable that 1 personification can understand each of it.

Why is Vinix written successful V?

Compilation is very fast. The full kernel rebuilds successful seconds, truthful changing something, rebuilding, and booting it is 1 speedy measurement alternatively of a java break. That keeps the whole strategy enjoyable to activity on.

V is besides elemental and readable. The language is mini capable to study successful an afternoon, the codification stays easy to travel months later, and it allows improvement to move quickly. That matters for an operating strategy built from scratch.

Is Vinix a Linux distribution?

No. Vinix is an independently developed, Unix-like operating strategy pinch its ain kernel, drivers, process model, filesystem layer, and strategy calls. It targets x86-64 and ARM64; Linux is not moving underneath it. But you tin tally Alpine Linux binaries connected Vinix.

It deliberately follows acquainted Unix and Linux conventions wherever that makes package easier to port. Compatibility is simply a applicable goal, not the operating system’s foundation.

What is the exertion stack?

Vinix boots pinch Limine, a bootloader that loads the Vinix kernel and supplies the early memory, framebuffer, and boot-module information. Above it is simply a freestanding kernel written mostly successful V, pinch C and a mini magnitude of architecture-specific assembly wherever hardware requires it.

The original kernel halfway (including its beingness and virtual representation managers and scheduler) was written by mintsuki, the creator of Limine. After a astir two-year region successful development, Alexander Medvednikov became its caller maintainer. Since then, Vinix sewage storage, networking, input, graphics, Unix-style userspace support, and compatibility pinch Alpine Linux binaries.

The strategy image pairs that kernel pinch an initramfs and a familiar command-line and improvement userland; autochthonal Vinix applications and its desktop are written successful V pinch V UI2.

What kernel architecture is it? Monolithic aliases a microkernel?

Monolithic. The scheduler, the beingness and virtual representation managers, the virtual filesystem, the instrumentality drivers, and the web stack each unrecorded successful 1 kernel image and run privileged successful a azygous reside space, calling each different straight alternatively of passing messages. That is the pragmatic choice: nary IPC information travel connected each disk publication aliases network packet, and Linux-compatible behaviour stays straightforward to implement.

Monolithic does not mean big. The kernel is written mostly successful V and is mini capable for one personification to publication through. It is simply a higher-half kernel loaded by Limine, preemptive and SMP-aware, pinch per-CPU state, fine-grained locking, and consciousness of NUMA and multi-socket representation topology. Every process gets its ain reside space, and personification code runs unprivileged and enters the kernel done Linux-compatible strategy calls.

There are nary loadable kernel modules. Drivers are compiled into the kernel image, and because a afloat kernel rebuild takes seconds successful V, rebuilding and rebooting is the fast path anyway.

How do drivers work?

A driver is an mean V module wrong the kernel character pinch an initialise() function that kernel startup calls successful order. Hardware is discovered per platform: a PCI bus scan positive ACPI connected x86-64, and a instrumentality character handed complete by firmware connected Apple Silicon.

Once initialised, a driver publishes its node nether /dev done devtmpfs and implements the kernel’s Resource interface: read, write, ioctl, mmap, and the rest. Regular files instrumentality that aforesaid interface, truthful the VFS, the publication and constitute system calls, polling, and representation mapping each activity complete devices without a abstracted path. Interrupts get done the platform’s controller, AIC connected Apple Silicon, GIC connected generic ARM64, APIC connected x86-64, and the handler wakes whichever threads were waiting connected that event.

What exists today: NVMe, AHCI, and ATA retention pinch GPT partitions and ext2; console, pty, serial, keyboard, mouse, HD Audio, and framebuffer devices; the virtio family (block, network, GPU, input) for virtual machines; and, connected Apple Silicon, ANS storage, the DART IOMMU, mailbox and RTKit for the coprocessors, SMC, the SPI keyboard and touchpad, Type-C, and Wi-Fi. Graphics goes done a minimal DRM subsystem pinch GEM buffer objects that implements only what the AGX GPU and DCP show controller drivers really need.

Is Vinix deterministic?

Not successful the real-time sense. Vinix is not a real-time operating strategy and makes no latency guarantee. The scheduler is preemptive and has precisely 1 policy: a thread gets a timeslice weighted by its bully value, and the kernel arms a one-shot timer for it. Asking for SCHED_FIFO aliases SCHED_RR fails with EINVAL alternatively of being accepted and past softly scheduled for illustration everything else, because answering yes location would beryllium a lie. Hard real-time activity needs a different system.

Where it is predictable, deliberately so: the kernel has nary garbage collector. It is built pinch -gc nary and manual representation management, truthful nary postulation walk can stop a strategy call, an interrupt handler, aliases the compositor astatine a infinitesimal of its own choosing. Memory usage stays level and bounded alternatively than sawtoothed, which is simply a ample part of why the strategy still feels the aforesaid aft it has been moving for a while.

The aforesaid applies to what runs astatine all. One distribution, 1 desktop, 1 init system, one package manager, and a fixed footwear series mean 2 machines booting the aforesaid image bring up the aforesaid services successful the aforesaid order. There is nary accumulated section configuration deciding really your machine behaves today.

Kernel subsystems are tested the aforesaid way, pinch seeded pseudo-random sequences rather than unrecorded randomness: the page cache runs hundreds of deterministic randomized operations, and drivers specified arsenic Apple’s ANS retention and SPI keyboard are fed thousands of deterministic mutated packets, truthful a nonaccomplishment reproduces precisely alternatively of erstwhile successful a while. Build output is simply a abstracted question: images travel from a azygous merchandise build script, but byte-for-byte reproducible images are not thing Vinix claims yet.

How tin Vinix tally Alpine Linux binaries?

On ARM64, Vinix tin usage selected Alpine Linux aarch64/musl packages. They tally natively on the aforesaid CPU architecture: location is nary Linux virtual instrumentality and nary CPU emulation successful that path. Vinix supplies the supported Linux-facing ELF, musl, and system-call behaviour the programs expect.

The pkg instrumentality resolves a package and its runtime limitations from Alpine’s repositories, stages them successful the Vinix image, and skips Alpine maintainer scripts that assume Alpine’s ain init system. This is targeted compatibility, truthful supported and tested applications activity straight while unimplemented Linux kernel features tin still limit others.

Does Vinix person a package head aliases an app store?

Yes. Vinix ships pinch pkg, a command-line package head that installs software from Alpine Linux’s aarch64 repositories, truthful location are thousands of existing packages to tie connected alternatively of a mini fistful ported by hand.

pkg update refreshes the indexes, pkg hunt finds a package, and pkg instal pulls it successful on pinch its dependencies. There is also pkg remove, pkg upgrade, pkg list, and pkg info. Package names are Alpine’s own, and Vinix presently tracks Alpine 3.21 for aarch64. Chromium, GIMP, Blender, Gnumeric, Sublime Text, GTK, and the usual command-line devices each instal this way, though applications that request Linux kernel features Vinix has not implemented yet tin still autumn short.

There is nary graphical app shop yet. pkg is simply a terminal instrumentality for now.

What desktop situation and model head does Vinix use?

The default is Vinix’s ain autochthonal desktop: a V + V UI2 desktop situation and window manager successful one. It sounds input and draws straight to the framebuffer, compositing its own windows without a show server beneath it.

Vinix besides supports X.org pinch an X model manager, positive an optional ARM64 Wayland session using Hyprland. Those are compatibility and experimentation paths; the autochthonal Vinix desktop remains the normal session.

Project roadmap

The instauration reaches from a autochthonal toolchain and acquainted userland to desktops connected some awesome architectures.

Available today

  • mlibc, bash, GCC/G++, V, and nano
  • Storage drivers and ext2
  • Networking
  • V-UI
  • X.org and an X model manager
  • Wayland pinch Hyprland connected aarch64
  • Intel VT-x hypervisor

On the horizon

  • Intel HD graphics driver
  • M1–M5 GPU drivers
Email the maintainer
Other Article Hacker News
Close Right Ads
Close Left Ads