Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. OpenJev(openjev.com ↗)
    15comments
  2. Jemalloc 5.4.0(github.com/jemalloc ↗)
    45comments
  3. The scourge of x86 emulation(fex-emu.com ↗)
    27comments
  4. Astra for Law(openai.com ↗)
    578comments
  5. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    135comments
  6. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    222comments
  7. Qwen 3.8 Omni Flash(qwen.ai ↗)
    82comments
  8. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    170comments
  9. Replacing Pull Requests with Delta(zed.dev ↗)
    4comments
  10. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    38comments
  11. Wax motor(wikipedia.org ↗)
    70comments
  12. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    234comments
  13. When the fractional part of a float fixes your shader(crocidb.com ↗)
    1comments
  14. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    12comments
  15. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    155comments
  16. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    11comments
  17. How to Write with an LLM(sockpuppet.org ↗)
    104comments
  18. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    24comments
  19. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    59comments
  20. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    27comments
  21. Why Does the Universe Expand?(cosmicave.org ↗)
    57comments
  22. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  23. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    42comments
  24. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    370comments
  25. Apple detectives solved mystery of ancient tree and rewrote the history of fruit(scientificamerican.com ↗)
    12comments
  26. How do we prevent mathemathics from devolving into the Medieval Era of secrecy?(mathoverflow.net ↗)
    108comments
  27. The most important product decision is what you don't build(liamnugent.me ↗)
    39comments
  28. CrowdSec Source Code Leak(crowdsec.net ↗)
    49comments
  29. How Uber Protects Against Retry Storms(uber.com ↗)
    44comments
  30. Show HN: Snapdrop: Instantly share files between devices. No setup, no signup(snapdrop.me ↗)
    37comments

The scourge of x86 emulation

154 pointsby 6h agofex-emu.com
27 comments
4h agoHN ↗

For reference , Fex is a translation framework for x86 to ARM much like Apple’s Rosetta2 and Microsoft’s Prism.

Valve sponsor development as it’s also the way the new Steam Frame supports x86 games. It’s also being used (as a fork) in Crossover Beta to replace the use of Rosetta2.

2h agoHN ↗

Why doesnt Stream require their binaries to be compiled to some bytecode and transpiled during the install ?

THen they wouldnt require any emulator for any new compiles.

2h agoHN ↗

Existing games will not be recompiled for the new bytecode target, and they want all of those games to work regardless.

2h agoHN ↗

I don't know, but assumed that Valve doesn't require studios to recompile their software or use any special tooling, it's basically just packaging of existing executables. This is also why they do Windows on Linux emulation.

2h agoHN ↗

Why doesnt Stream require their binaries to be compiled to some bytecode and transpiled during the install ?

They still have to support the entire back-catalog. It's not reasonable to expect thousands of existing games to port to ARM

1h agoHN ↗

This is what Android does with Dalvik/Android Runtime. Apps you download from the store are compiled to bytecode that is then compiled to native code at installation time.

With the compilation making use of the native instruction set supported for your device, so it can make use of newer arm instructions on newer devices while still supporting older devices.

This is the major reason app installation is so slow in Android compared to iOS (which pre-compiles everything). But it also greatly improves app compatibility with older versions.

There is no way Valve would be able to convince all the myriad of game engine developers to support a proprietary (or even open source) bytecode format even in the future. Best they could do is make it an opt-in.

Android only pulled it off because Google provides the "engine" (Android SDK) for all apps made for the platform and it did from the start.

And even so, most Androids games actually bypass this system entirely and just hand-compile to native binaries anyway. Because, again, the game engines don't want to support this bytecode format and google doesn't offer a C++ toolchain themselves that the engine developers could integrate with.

1h agoHN ↗

Games use plenty of native code; so much in fact that when Intel tried to enter the Android tablet market with x86 they had to write an ARM emulator.

54m agoHN ↗

I mentioned this in the last paragraph of my previous message...

2h agoHN ↗

Several games in their library are actually just game updater/launcher binaries, which manage their associated game assets and binaries externally.

2h agoHN ↗

because there's no gaming-oriented toolchain for it

1h agoHN ↗

Because even with their effective monopoly they don't have the power to bully developers into doing whatever suits Valve. And it would be disastrous for the industry if they did.

43m agoHN ↗

I mean don't modern CPUs basically just run an x86_64 emulator on a RISC machine anyway? Like there's a layer between the microcode and the actual x86 instructions already.

33m agoHN ↗

I think it's more like a (kinda) VLIW machine but yes, pretty much

45m agoHN ↗

I hate that you're being downvoted for asking a perfectly reasonable question.

Guys, if you don't like the premise of the question, reply and say why, don't downvote.

I think it's a good question, and my guess for the answer is this - which is going to be the easier problem to solve?

"Hi guys if you want to publish on Steam you have to use this specific tooling and language that'll compile to native code on first run" and everyone just has to do it

or

"Hi guys we want to be able to publish everything so it runs on Arch Linux that we run on our Steamdeck, even if only Windows binaries are available, so given that Gaben is a billionaire what we'll do is just pay guys to make Wine not suck"

You choose.

22m agoHN ↗

That will open a can of worms. For one thing, Valve will be accused of trying to create a walled garden. Plus there's the whole problem of supporting the back-catalogue as others have said.

---

Maybe the best that they could to is to offer to distribute recompiled versions of the emulated binaries, similar to how they distribute compiled shaders. But I don't know if that would work, especially legally.

3h agoHN ↗

As noted in the article, Apple solved this problem six years ago by simply adding an x86-compatible memory ordering mode to their chip when x86 emulation became important. Yet another way Apple's chips lead the industry.

3h agoHN ↗

Well well well “modeless” has decided to finally see the light of modes

13m agoHN ↗

Arm was never modeless. Thumb is a separate encoding with different instruction semantics and Jazelle ran Java bytecode. Both of them need a special branch instruction to enter. What they don't have is legacy modes like real, v8086 or native 16/32 protected that have no reason to exist when a CPU in long mode can run 16 and 32 bit code (in compatibility sub mode) just fine.

2h agoHN ↗

And as noted in the article, while that helps a lot with most of the issues, there are some corner-cases they still don't handle.

1h agoHN ↗

The word "simply" is doing a lot of work there

2h agoHN ↗

Great article ! This is the kind of content I always hope to find on HN's front page.

I really wonder how things are organized at Apple to allow for vertical integration to work so well. That feature alone must have involved so many people from so many different teams.

1h agoHN ↗

The actual product people understood it to be paramount to the success of the product and so I feel like from up high there was actual commitment.

1h agoHN ↗

The intro of this article repeats the common assertion that

ARM is the most relaxed, allowing significant hardware optimizations; and x86 is the most strict, enforcing a very strong coherency model that doesn’t allow a lot of room for optimization

but I've seen some compelling arguments that a relaxed model doesn't necessarily have much of a benefit, https://fgiesen.wordpress.com/2026/08/25/memory-ordering-in-...

1h agoHN ↗

Slightly related but this project (FEX) is amazing. I've been running Armada OS on multiple ARM handhelds and they're viable little linux machines now except with amazing battery life.

Most problems I run into are anti cheat related (EAC, etc.) but those can be circumvented for now. Feels kind of insane how far x86 emulation has come.