Kakehashi 更新:运行 Apple Clang 构建并将开销降至 1.24 倍
2 分•作者: vlad_kalinkin•大约 2 个月前
大家好 HN!<p>11 天后,我带着 Kakehashi 的更新回来了。感谢您的支持!
感谢您的所有点赞和评论。我没想到大家对这个项目会如此感兴趣。<p>更新内容:<p>我设法显著加快了实现过程。现在,与 Linux 原生性能相比,7zip 的速度仅慢 1.24 倍,而 Lua 的构建与原生启动相比,差异仅为 1.5 到 2 秒。
由于 Linux 特定的标志,Lua 构建无法通过 kh run make 进行编译,这与它在 macOS 原生环境中的行为类似。但是,如果使用 kh run gcc -- -Wall -O2 -DLUA_USE_MACOSX -std=c99 onelua.c -lreadline -o /tmp/lua-onelua 进行构建,则一切都可以完美编译、构建和运行。
总的来说,我目前正在积极开发以下二进制文件:git、clang、make、xcrun、otool、gcc、curl、7zip、rm、ls、sh、csh、zsh、bash 和 Rust 安装脚本。
请注意,目前您需要手动将 macOS 安装中的 /bin、/sbin、/usr/bin 和 /usr/lib/zsh 文件夹移植到访客环境(“瓶子”)中,该环境位于 ~/.local/share/kakehashi/bottle/,因为没有这些核心依赖项,整个设置将无法工作。<p>至于已知问题:目前,xcodebuild 遇到 SIGSEGV 信号,Rust 安装程序仍无法正常工作(它以错误 1 退出,我尚未能查明确切的根本原因)。此外,zsh 在本地化和编码方面存在一些错误,令人惊讶的是,这些错误在其他类似的实用程序中并未出现。当然,您仍然可能在不同的二进制文件或未经测试的边缘情况下遇到未实现的符号和其他各种错误。它距离完成的产品还很远,但与 11 天前相比,它已经完全不同了。<p>我将非常感谢您在测试、查找边缘情况和发现执行瓶颈方面的任何帮助——尤其是在非标准配置下(例如从外部驱动器运行环境)。也非常欢迎 Pull Request。我一个人实在无法跟上所有事情。再次感谢大家!<p>链接:https://github.com/wie-project/kakehashi
查看原文
Hello again HN!<p>After 11 days, I'm back with an update about Kakehashi. I want to thank you for your support!
Thank you for all your stars, comments. I didn't expect you to be so interested in the project.<p>What's new:<p>I managed to significantly accelerate the implementation process. Now, 7zip lags by just 1.24x compared to native Linux performance, and the Lua build differs literally by 1.5 to 2 seconds from a native launch.
The Lua build fails to compile via kh run make due to Linux-specific flags, which mirrors its behavior on native macOS. However, if it is built using kh run gcc -- -Wall -O2 -DLUA_USE_MACOSX -std=c99 onelua.c -lreadline -o /tmp/lua-onelua, everything compiles, builds, and runs perfectly.
Overall, I am currently actively working on the following binaries: git, clang, make, xcrun, otool, gcc, curl, 7zip, rm, ls, sh, csh, zsh, bash, and the Rust installation script.
Please note that you currently need to manually port the /bin, /sbin, /usr/bin, and /usr/lib/zsh folders from a macOS installation into the guest environment ("bottle") located at ~/.local/share/kakehashi/bottle/, since the entire setup won't work without these core dependencies.<p>As for the known problems: right now, xcodebuild hits a SIGSEGV, and the Rust installer still fails to work correctly (it exits with error 1, and I haven't been able to pinpoint the exact root cause yet). Additionally, zsh has some bugs with localization and encodings, which surprisingly don't occur in other similar utilities. And, of course, you can still encounter unimplemented symbols and various other errors across different binaries or untested edge cases. It is still far from a finished product, but compared to what it was just 11 days ago, it's in a completely different state.<p>I would be incredibly grateful for any help with testing, finding edge cases, and uncovering execution bottlenecks—especially in non-standard configurations (such as running the environment from an external drive). Pull requests are also highly welcome. It is simply impossible for me to keep track of everything on my own. Thank you all once again!<p>Link: https://github.com/wie-project/kakehashi