Lying to Zed to get its remote server running on FreeBSD hayzam.com · 16 points ...
HN Best 200 @best
Lying to Zed to get its remote server running on FreeBSD hayzam.com · 16 points · 3 comments · HN thread
TL;DR The author describes running Zed's Linux remote server on FreeBSD by spoofing uname to report Linux x86_64 and enabling Linux compatibility, then explains a Linuxulator getdents bug that silently or loudly dropped directory entries. The bug was a regression from a February 2026 NFS fix, and the author's patch (ec6629628cb) landed in main, stable/15 and releng/15.2. The post also says the author switched from VS Code to Zed partly for its native AI-off setting.
- Zed has no FreeBSD remote server, so the author runs its Linux x86_64 server on FreeBSD with Linux compatibility enabled (linux_base-rl9).
- A small uname wrapper reports Linux x86_64 to Zed's platform check and passes all other calls to the real uname.
- Empty project trees came from a Linuxulator bug: getdents requests were rounded up to 512-byte blocks, so native batches could overflow the caller's buffer and advance the offset past entries.
- In the author's test, 112 of 1,002 files vanished from the listing silently before the fix; the error path showed the folder as empty.
- The fix only reads up to the caller's buffer size when it is smaller than 512 bytes, and it also covers legacy getdents; the test matrix went from 86 failures to zero.
- The fix is in main, stable/15 and releng/15.2, so 15.2-RELEASE should include it.
Discussion The thread is very small, with three comments. It starts from a commenter asking whether the remote server only needs to compile for FreeBSD, and points to Zed's FreeBSD docs noting that audio calls don't work there. A reply explains that Zed was originally built for human collaboration before its AI focus, and the original commenter says they hadn't realised Zed included calls and screen sharing. The mood is casual and mildly curious, with little argument.
- Zed's FreeBSD remote server needs only compilation work (some): One commenter asks whether the remote server just needs to compile for FreeBSD, implying the remaining gap is mainly build support rather than missing features.
- Audio calls are a surprising part of Zed (some): A commenter finds it odd that Zed includes audio calls and screen sharing, having assumed people would use other tools for that. Another explains it as a legacy of collaboration features predating the AI focus.
Links from the comments