(评论)
(comments)
原始链接: https://news.ycombinator.com/item?id=38101613
将 Docker 等项目与 Cosmopolitan 进行比较是不正确且具有误导性的。 虽然 Docker 提供了一种将应用程序打包为完整环境(包括其自己的 Linux 发行版)的方法,但它最终依赖于主机系统,并要求它们满足某些要求才能正常运行,而 Cosmopolitan 的目标是提供轻量级、可移植、独立且易于使用的应用程序。 在各种架构上提供高效的执行环境,无需任何额外的基础设施或中间件层即可运行。 此外,将它们与反恶意软件解决方案进行比较是毫无根据且不公平的; Cosmoplitan 致力于在不影响性能或功能的情况下提供安全的功能。 关于可扩展性,通过适当的设计实践和优化工作可以减轻与两侧分叉相关的潜在复杂性增加。 然而,这种批评忽略了这样一个事实:与 Docker 等类似技术相比,Cosmopolitan 提供了独特的价值主张,特别是在存在空间限制、必须最大限度地减少资源使用或带宽限制禁止将容器传输到目标系统的情况下。 最后,比较两者让人想起忽略笔记本电脑与台式机之间的同类比较。
https://github.com/jart/cosmopolitan/releases/download/3.0.1... is 213MB file which contains "fat binaries" (single binaries that execute on a bewildering array of hardware platforms and operating systems) for dozens of programs, including zip, curl, git, wget, python, ctags and even my own Datasette Python application!
It's absolutely wild that this works.
I just tried it out (on macOS). I downloaded and extracted that zip and did this:
It refused the first time because of macOS security settings. I had to open the security panel and click "allow"... and then it worked!Likewise, this worked:
That started a https://datasette.io/ server running on port 8000.Git works too:
That git binary is 6.3MB, and I believe that same exact file can be copied to a Linux or Windows machine and will work the same way.reply