惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The Hacker News
The Hacker News
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
人人都是产品经理
人人都是产品经理
Recent Announcements
Recent Announcements
D
DataBreaches.Net
P
Proofpoint News Feed
V
Visual Studio Blog
J
Java Code Geeks
Recorded Future
Recorded Future
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Full Disclosure
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
罗磊的独立博客
Jina AI
Jina AI
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
G
GRAHAM CLULEY
Y
Y Combinator Blog
L
LangChain Blog
L
LINUX DO - 热门话题
宝玉的分享
宝玉的分享
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security
云风的 BLOG
云风的 BLOG
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园_首页
A
About on SuperTechFans
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Latest news
Latest news
T
Threatpost
T
Tenable Blog
有赞技术团队
有赞技术团队
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
Stack Overflow Blog
Stack Overflow Blog
C
Cisco Blogs
C
Check Point Blog
T
Tor Project blog
T
Threat Research - Cisco Blogs
T
The Exploit Database - CXSecurity.com
S
Schneier on Security
美团技术团队
I
Intezer
S
Securelist
AWS News Blog
AWS News Blog

Lobsters

CIFSwitch: a non-universal Linux local root vulnerability RIPE NCC session fixation: poaching logins with an Atlas probe GNOME 2.20 but its Web Components Agentic Search for Context Engineering – Leonie Monigatti Garnix is shutting down [not OC] akashina.tngl.sh/jjc Concerning Emacs (and Jazz) Nitpicking the shell history scene in ‘Tron: Legacy’ What's cooking on SourceHut? Q2 2026 The tenth OpenPGP email summit Package managers that package package managers Clojure on Fennel part three: parsing WordPress at 23 Finding Miscompiles for Fun, Not Profit GitHub - creusot-rs/creusot: Creusot helps you prove your Rust code is correct. Announcing Rust 1.96.0 | Rust Blog A Love Letter to Neovim sqlite AGENTS.md Am I a Bad Friend? CSS vs. JavaScript • Josh W. Comeau Erlang Ecosystem Foundation - Supporting the BEAM community A brief note about slot access cost in Common Lisp Keyboard latency probe Rethinking the GNOME clipboard issues Back to the Building Blocks’ Building Blocks Tech Notes: Theseus: translating win32 to wasm Fast is better than slow Content-addressed Rust builds (or, what kache actually caches) Intent to Prototype: Embedding API Canada’s Bill C-22 and the security cost of collecting more data 5 PostgreSQL locking behaviors that trip people up okmij.org Stop advertising in your commits! | AksDev GitHub - mplsllc/macsurf: A modern web browser for Classic Mac OS 9 PowerPC. Real CSS3, ES5 JavaScript, native HTTPS — built with CodeWarrior on the Carbon API. Introducing DoomBench - Can Your Data Stack Run DOOM? What are some of your favourite developer tools? Building a Scalable Ingestion Pipeline with Temporal (Part 1) Converting shallow Git bundles into normal repositories Are you a member of any professional associations? What is a harmonic? An interactive comic about additive synthesis How Virtual Tables Work in the Itanium C++ ABI Using SwiftUI to Build a Mac-assed App in 2026 Rust (and Slint) on a jailbroken Kindle. ~jack/lambda-on-lambda - Serverless Haskell on AWS - sourcehut git Human proof for FOSS contributions Extremely simple internet radio controlled via IRC Announcing BABLR Splitting Konsole views from Helix to run tools | AksDev GitHub - yugr/rust-slides Serving files over HTTP three ways: synchronous, epoll, and io_uring update docs with information about building with build.py (#979) · astral-sh/python-build-standalone@c9c40c5 A Simple Makefile Tutorial On C extensions, portability, and alternative compilers Switching to Colemak | Pedro Alves Just How Bad Was The Intel IAPX432? Nix's Substituter List Is Not a Routing Table Accelerating copy_if using SIMD Lambda on Lambda: Serverless Haskell on AWS | Blog Announcing feed-repeat v1.0 Scaling Akvorado BMP RIB with sharding EYG news: A host of CLI improvements, new guides and new effects The social contract of writing JS Crossword C array types are weird; and related topics Flatpak will depend on systemd – OSnews Migrating from Go to Rust | corrode Rust Consulting A portentous reunion Vivado Licensing Options How my minimal, memory-safe Go rsync steers clear of vulnerabilities the entropy layer of a wavelet codec, on its own GitHub - nferhat/fht-compositor: A dynamic tiling Wayland compositor. Debian SE Linux and PinTheft Does bulk memmove speed up std::remove_if? (No.) 声明式部分更新 | Blog | Chrome for Developers Fully in-browser container builds Dianne Skoll's Web Site - Remind The Architecture of Open Source Applications (Volume 1)Berkeley DB Pardon MIE? - ironPeak Blog “Long-Term Support” doesn’t mean what you think Jira IS Turing-Complete May I recommend thinking of Emacs as your Fortress of Solitude hershey Floodgap Gopher-HTTP gateway gopher://thelambdalab.xyz/1cuneiforth/ HP QuickWeb, Singular And Pointless That one time I used Go panics for flow control A new suite of modern tools coming for editing and publishing RFCs From the Tabletop… The Digital Antiquarian Building a Host-Tuned GCC to Make GCC Compile Faster Are we self-sovereign PKI yet? Claw Patrol: an open-source security firewall for agents | Deno Revised^7 Report on Scheme, Large: Procedural Fascicle Draft is now public A Network Allow-List Won't Stop Exfiltration — André Graf From AFSK to Goertzel – µArt.cz Software For My New Home Server Introducing Neptune: Direct3D virtualization for QEMU AI Agent Bankrupted Their Operator While Trying to Scan DN42 - Lan Tian @ Blog mimalloc: A new, high-performance, scalable memory allocator for the modern era Making wl_shm fast The Soul of Maintaining a New Machine - Third Draft | Books in Progress What is Git made of?
Astral
2026-06-24 · via Lobsters

Porting Wine to Astral

Astral running Wine

A few months ago, I posted about Astral, a hobby OS I have been working on over the years, running Minecraft. Since then, others have gotten modern versions of Minecraft to run as well as Factorio (using a glibc compatible libc). However, while these games are made or packaged in a way that makes it easier to get them to run under a new OS, most games are not. A lot of games are closed source and compiled for Windows, which makes something like Wine a necessity for playing them.

One of my favorite games, Cogmind, falls under that umbrella. It is a 32-bit Windows only roguelike, and it became my goal to run it under Astral. While there was already an existing Wine port, it was extremely incomplete, as not even notepad.exe worked properly. To run Cogmind, the Wine port had to be finished, which also meant adding the ability to run 32-bit code on an otherwise 64-bit-only OS.

Basic Wine Functionality

The first step of getting Wine up and running was downloading MinGW and enabling it in the Wine build, as it is needed to compile the PE DLLs. With it enabled, notepad.exe works and selecting "Save as" does not crash it anymore!

Astral running Notepad under Wine

Compiling libEGL.so

There is still one big problem: Wine is being compiled without OpenGL support. While Astral did have OpenGL, Wine explicitly needs EGL to work, which Astral's Mesa port did not provide. EGL connects rendering APIs like OpenGL to the windowing system, which Wine needs to properly initialize graphics. At first, it seemed like a simple fix, just enable it in Mesa. However, Mesa does not support EGL on the xlib backend, forcing me to switch over to the DRI backend instead.

DRI (Direct Rendering Infrastructure) allows applications to communicate more directly with the GPU rather than going through the X server. This led me into a rabbit hole of having to patch Mesa to allow the X.org server to start without /dev/dri. In the end, I was successful and got a real game, Deltarune, to start:

Astral running Deltarune under Wine

WoW64 and 32-bit Windows programs

As Cogmind is 32-bit and Astral is 64-bit, more infrastructure is needed. This was accomplished using Wine's WoW64 mode, which does not need any 32-bit Unix libraries. It works by running 32-bit Windows binaries in a 64-bit process, translating between 32-bit and 64-bit system calls and data structures as needed, avoiding the need for a full 32-bit userspace.

Getting it to work mostly involved implementing LDT (Local Descriptor Table) support in the kernel, as x86-64 allows you to run 32-bit code in long mode using 32-bit segment descriptors. These describe how memory should be accessed and, in the case of code segments, how the processor runs those instructions. The LDT is one of the mechanisms used to define these segment descriptors and allows them to be configured on a per-process basis. It also needed some finicky glue in Wine's signal and syscall handling code.

Cogmind!

After implementing WoW64 support in the Astral port and fixing a few other bugs in the kernel, Cogmind works! The game was playable and did not have any noticeable issues other than game news and scoresheet upload not working.

Astral running Cogmind under Wine

Broken scoresheet upload

This bug manifested by a TCP connection to the Cogmind servers being opened and instantly closed without any data being transferred. At first, I thought this was a network stack issue, but this was not the case.

What made me suspicious it was something else was that the Wine debugging log function, __wine_dbg_write, was not working at all in WoW64. After digging deep into Wine's code, I eventually noticed I was forgetting to save a register in the __wine_unix_call_dispatcher function. This broke the PE to Unix transition and led to UB. With this fixed, scoresheet upload works!

More games and other programs

I have also tried to run some other applications under Wine:

Program Status Notes
FTL Works Fully playable.
Steam Partial Installs and updates; crashes on Chromium startup due to a broken GetInterfaceAddresses().
iexplore.exe Partial Simple sites render; complex pages crash with the same root cause as Steam.
Factorio Partial Window opens but does not progress past loading.
Spooky's Jumpscare Mansion Partial Starts but runs too slowly to be playable.
Noita Partial Starts but runs too slowly to be playable.
Plants vs. Zombies Broken Blocked by Steam DRM before reaching the main menu.
Half-Life Broken Assert failure in Wine's C++ runtime. Likely a missing implementation in the port.
Firefox / Chromium Broken Installer fails; does not reach a runnable state.
SCP: Containment Breach Broken Does not start; cause not yet diagnosed.
Unity games in general Broken There seem to be issues with wine-mono on Astral, as Unity games get stuck on MonoManager ReloadAssembly

Astral running Noita under Wine

Astral running FTL under Wine

Astral running iexplore.exe under Wine

Final thoughts

Porting Wine was a fun challenge and a way of proving that hobby OSes can be used to play a lot more games than originally thought, which is a step in the direction of hobby OSes becoming viable daily drivers. There are still some rough edges, performance issues and weird crashes, but the core of it works. This has also taught me a lot about the internal workings of Wine, especially while having to dig around to fix the PE-to-Unix transition.

One of my big goals related to the Wine port now is to get Steam to work, which would also mean Chromium works. As for Astral, I plan on focusing more on optimizations, new drivers and bug fixes in the near future. There is a lot of room for improvements on the kernel side.

Thanks for reading!