G

Gautham Venkatasubramanian

ahgamut.github.io · Personal blog · on HN since 2021

Gautham Venkatasubramanian writes about building portable executables with Cosmopolitan libc, including Python and Rust examples and patching GCC.

What HN saysHN links it as proof that Python and Rust can be built into single portable binaries with Cosmopolitan, answering questions about packaging without a rewrite.
17HN people shared it
8linked it in comments
11stories submitted
1.7Kstory points
1 year agolast shared
2021people per year2026

Most-shared posts

  1. 1
    Python is Actually Portable
    6 people · 444 points · first shared 2022 · 120 comments on HN
  2. 2
    Rust is actually portable
    5 people · 358 points · first shared 2022 · 103 comments on HN
  3. 3
    Actually Portable Executables
    3 people · 683 points · first shared 2021 · 154 comments on HN
  4. 4
    Patching GCC to Build Portable Executables
    2 people · 17 points · first shared 2023 · 2 comments on HN
  5. 5
    Debugging C with Cosmopolitan Libc
    1 people · 191 points · first shared 2022 · 50 comments on HN
  6. 6
    Python Is Actually Portable
    1 people · 2 points · first shared 2021 · discussion on HN
  7. 7
    Ape datasette.gif
    1 people · first shared 2024

What HN people wrote when they linked it

csdvrx · 2023-01-14
> Still not a single binary but as you note with it being written in python and based on cdparanoia, etc how would that work? Cosmopolitan python is a good starting point: https://ahgamut.github.io/2021/07/13/ape-python/ > IMO Docker is one of the "best" and most straightforward ways to package up all of this No. Using containers has its place. But would you use containers on hello world? Likewise, if you've got to use a container for cd ripping tool, you've failed somewhere.
9029 · 2025-07-28
I wonder if cosmopolitan libc[0] could be leveraged to create an actually portable executable™ without a rewrite, looks like someone has figured out compiling python 3.11.4 with it[1] [0] https://github.com/jart/cosmopolitan [1] https://ahgamut.github.io/2021/07/13/ape-python/
ingenieroariel · 2024-04-15
Thanks for updating the blog post too with the datasette screen recording, the speed difference is quite noticeable. Adding it here since a few people were wondering about it in the comments, but feel free to check the original article for the 2024 update: https://ahgamut.github.io/images/ape-datasette.gif
f_devd · 2022-09-12
I think that should be possible with Cosmopolitan Rust (https://ahgamut.github.io/2022/07/27/ape-rust-example/). It would create a Baremetal runnable ELF binary with just cosmopolitan libc statically linked, not sure about driver support though.
pritambarhate · 2022-07-28
The python article mentions those: https://ahgamut.github.io/2021/07/13/ape-python/ > This post describes a proof-of-concept Python executable (2.7.18 and 3.6.14) built on Cosmopolitan Libc, which allows it to run on six different operating systems (Linux, Mac, Windows, NetBSD, FreeBSD, OpenBSD)
still_grokking · 2021-12-05
> The cool thing would be multi-host static binaries My first thought was someone is thinking about something like: https://ahgamut.github.io/c/2021/02/27/ape-cosmo/ There is also something similar that can make binaries that run even bare metal or as EFI apps. But I can't find at the moment. (Maybe someone else has the link?)
andai · 2021-02-28
>We've just created a 336kb Lua interpreter binary that runs on seven operating systems, thanks to Cosmopolitan Libc. https://ahgamut.github.io/c/2021/02/27/ape-cosmo/

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close