Kakehashi 更新:运行 Apple Clang 构建并将开销降低至 1.24 倍

1 分•作者: vlad_kalinkin•大约 2 个月前•原帖
你好,HN!<p>经过11天,我又回来了,带来了关于Kakehashi的更新。感谢大家的支持!感谢你们的星标和评论,我没想到你们对这个项目如此感兴趣。<p>最新进展:<p>我成功地显著加快了实现过程。现在,7zip的性能与原生Linux相比,仅有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在本地化和编码方面存在一些bug,令人惊讶的是,这些问题在其他类似工具中并未出现。当然,您仍然可能会遇到未实现的符号和不同二进制文件或未测试的边缘情况中的各种其他错误。距离完成产品还有很长的路要走,但与11天前相比,现在的状态完全不同。<p>我将非常感激任何关于测试、寻找边缘情况和发现执行瓶颈的帮助,特别是在非标准配置下(例如从外部驱动器运行环境)。也非常欢迎提交拉取请求。对于我来说,独自跟踪所有内容几乎是不可能的。再次感谢大家!<p>链接:https://github.com/wie-project/kakehashi
查看原文
Hello again HN!<p>After 11 days, I&#x27;m back with an update about Kakehashi. I want to thank you for your support! Thank you for all your stars, comments. I didn&#x27;t expect you to be so interested in the project.<p>What&#x27;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 &#x2F;tmp&#x2F;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 &#x2F;bin, &#x2F;sbin, &#x2F;usr&#x2F;bin, and &#x2F;usr&#x2F;lib&#x2F;zsh folders from a macOS installation into the guest environment (&quot;bottle&quot;) located at ~&#x2F;.local&#x2F;share&#x2F;kakehashi&#x2F;bottle&#x2F;, since the entire setup won&#x27;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&#x27;t been able to pinpoint the exact root cause yet). Additionally, zsh has some bugs with localization and encodings, which surprisingly don&#x27;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&#x27;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:&#x2F;&#x2F;github.com&#x2F;wie-project&#x2F;kakehashi