Hacker GitHub

← All repos

jart/cosmopolitan

View on GitHub ↗ ★ 21,431 C

build-once run-anywhere c library

293 mentions on Hacker News by 135 people: 24 stories, 269 comments · first 2020-06-20 · latest 2026-10-11

Mentions per year 293 mentions · busiest year 2021 (69)
20082026
  1. It may be time to revisit cosmopolitan ( https://github.com/jart/cosmopolitan ) and redbean (redbean.dev - although the tls certs are expired and it seems scrubbed off of github).
    comment by simpaticoder · 2026-10-11 · in Unikernels were hard. key word: were
  2. ▲ 3
    Cosmopolitan Libc Project Abandoned?
    story by kencausey · 2026-10-05 · 0 comments
  3. Also Cosmopolitan lib: https://github.com/jart/cosmopolitan/blob/master/libc/README... Note how all the "wrong" lines are down to markdown formatting.
    comment by ncruces · 2026-08-31 · in “I just chose words carefully”
  4. …Cosmopoliton[2] instead. [1] https://www.pcjs.org/software/pcx86/sys/windows/win95/4.00.9... [2] https://github.com/jart/cosmopolitan
    comment by jasomill · 2026-08-12 · in I hate packaging my software for Linux
  5. …it? That's what Cosmopolitan/APE does though, and they deliver a python: * Source: https://github.com/jart/cosmopolitan/ * Python Binary: https://cosmo.zip/pub/cosmos/bin/python which is ~ 40MB.
  6. …+ BIOS with the best possible performance and the tiniest footprint imaginable." * Python Source: https://github.com/jart/cosmopolitan/tree/master/third_party... * Python Binary: https://cosmo.zip/pub/cosmos/bin/python which is ~ 40MB.…
  7. FWIW, that's existed for a while. Source at https://github.com/jart/cosmopolitan/tree/master/third_party... with downloadable binary at https://cosmo.zip/pub/cosmos/bin/sqlite3 . % curl -LO 'https://cosmo.zip/pub/cosmos/bin/sqlite3' %…
    comment by eesmith · 2026-07-16 · in SQLite should have (Rust-style) editions
  8. …bunch of options from a Google search, but embedding it in a thin C program and building that with https://github.com/jart/cosmopolitan would be a pretty go-like experience, I'd think.
    comment by zdragnar · 2026-06-25 · in LuaJIT 3.0 proposed syntax extensions
  9. …would be even faster. Or just make your code boot directly. It's not hard to make a .efi, or use https://github.com/jart/cosmopolitan to make a binary that runs in many places including bare metal.
    comment by yjftsjthsd-h · 2026-06-15 · in Boot Naked Linux
  10. …which runs anywhere. Would be fun to be able to pass around self-executable website archives. https://github.com/jart/cosmopolitan https://justine.lol/cosmopolitan/index.html https://redbean.dev (Certificates just expired for justine's…
  11. …make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan
  12. …as a single cross-OS/arch fat binary. It looks like this may be a way to actually accomplish that: https://github.com/jart/cosmopolitan .
  13. The power move would have been Cosmopolitan, or a package similar to it. https://github.com/jart/cosmopolitan Cosmopolitan can be used to bundle up any gui package, and your code, and a team of professional software devs should be able to…
    comment by observationist · 2026-03-04 · in Claude is an Electron App because we've lost native
  14. …essentially a "libc virtualization". But Musl is only available on Linux, isn't it? Cosmopolitan ( https://github.com/jart/cosmopolitan ) goes further and is available also on Mac and Windows, and it uses e.g. SIMD and other performance…
  15. There is this project "actually portable executable"/cosmopolitan libc https://github.com/jart/cosmopolitan that allows a compile once execute anywhere style type of C++ binary
  16. Naturally this makes me think of the brilliant Justine Tunney's https://justine.lol/ape.html / https://github.com/jart/cosmopolitan / https://redbean.dev/
    comment by gegtik · 2026-01-18 · in Overlapping Markup
  17. Reminds me of the Cosmopolitan project: https://github.com/jart/cosmopolitan
  18. https://github.com/jart/cosmopolitan/issues/35#issuecomment-... The idea of "fuck it, let's do Windows everywhere" was introduced by Justine Tunney as an April Fools Joke in the Cosmopolitan repository. That's it. An april fools joke.
    comment by gaigalas · 2025-12-31 · in Loss32: Let's Build a Win32/Linux
  19. That makes sense. Some digging turns up some workarounds; the best I found was https://github.com/jart/cosmopolitan/releases/tag/3.1
    comment by CGamesPlay · 2025-12-15 · in Go is portable, until it isn't
  20. Looks like this is the relevant code https://github.com/jart/cosmopolitan/compare/master...igravi...
  21. I've gotten Claude Code to port Ruby 3.4.7 to Cosmopolitan: https://github.com/jart/cosmopolitan I kid you not. Took between a week and ten days. Cost about €10 . After that I became a firm convert. I'm still getting my head around how…
    comment by igravious · 2025-11-21 · in FAWK: LLMs can write a language interpreter
  22. Cosmopolitan C library would like to have a word with you then https://github.com/jart/cosmopolitan
  23. Maybe Jart's APE could "host" the multiple flavors of the executable: https://github.com/jart/cosmopolitan/blob/master/ape/specifi...
    comment by DrNosferatu · 2025-11-06 · in Introducing architecture variants
  24. …make it cross-platform executable[1] that has no dependencies to get the perfect file format. [1]: https://github.com/jart/cosmopolitan
  25. yeah, C is great xplat. so I wait Zig to target https://github.com/jart/cosmopolitan at some point too
  26. …which, contrary to the headlined NANOG mailing list thread, is being parsed, as we can see: * https://github.com/jart/cosmopolitan/blob/master/net/turfwar... * https://justine.lol/threads/ I think that the person who thinks that…
    comment by JdeBP · 2025-08-16 · in One person was able to claim 20M IPs
  27. …13 bytes (I _believe_ previously it was incorrectly stating 17 which it should have been 14) [0] https://github.com/jart/cosmopolitan/blob/master/libc/nexgen... [1] https://github.com/jart/cosmopolitan/commit/e96aceae41121630...
  28. ▲ 4
    Cosmopolitan: Build-once run-anywhere C library
    story by Bogdanp · 2025-08-06 · 0 comments
  29. …first guess would be: server honors X-Forwarded-For where it should not? Edit: looks like thats it: https://github.com/jart/cosmopolitan/blob/master/net/turfwar... So basically someone is running a script iterates over the whole ipv4 range…
    comment by maverwa · 2025-08-05 · in Welcome to the IPv4 Games
  30. …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/
  31. I guess https://github.com/jart/cosmopolitan might just be the WebAssembly for the command line then.
    comment by aninteger · 2025-07-08 · in WebAssembly: Yes, but for What?
  32. Wouldn't Cosomoplitan be the true cross-compiling in this case? https://github.com/jart/cosmopolitan
    comment by haunter · 2025-06-30 · in Cross-Compiling Common Lisp for Windows
  33. My early contributions to https://github.com/jart/cosmopolitan were focused towards getting a single-file Python executable. I wanted my Python scripts to run on both Windows and Linux, and now they do. To try out Python, you can: wget…
    comment by ahgamut · 2025-06-25 · in Gemini CLI
  34. ▲ 1
    Cosmopolitan v4.0.2
    story by overbytecode · 2025-06-07 · 0 comments
  35. I guess that makes https://justine.lol/ape.html and https://github.com/jart/cosmopolitan hacks on top of a hack.
  36. …math is the enlightened way to do things. I wrote an example in the cosmo repo of how to use it. https://github.com/jart/cosmopolitan/blob/master/examples/tr...
    comment by jart · 2025-06-01 · in Beware of Fast-Math
  37. …that can run natively on Windows, Linux, Mac, etc: https://news.ycombinator.com/item?id=32648359 https://github.com/jart/cosmopolitan https://en.m.wikipedia.org/wiki/Fat_binary
  38. Um? Should it be noted that cosmopolitan is currently at version 4? https://github.com/jart/cosmopolitan/tree/4.0.2
    comment by bjconlan · 2025-02-01 · in Cosmopolitan Third Edition
  39. ▲ 3
    Release Cosmopolitan v4.0.0 · jart/cosmopolitan
    story by josephscott · 2025-01-23 · 0 comments
  40. That feels like the ISO equivalent of Cosmopolitan libc [0]. [0] - https://github.com/jart/cosmopolitan
  41. …you need to worry about. For an example of a modern C++ toolchain that uses SJLJ exceptions, see https://github.com/jart/cosmopolitan/releases/tag/3.7.1 Please note that SJLJ exceptions carries a tradeoff. While SJLJ will make throwing…
  42. https://github.com/jart/cosmopolitan/blob/master/third_party...
    comment by jart · 2024-11-26 · in Fly.io outage – resolved
  43. …was originally written in C. It hasn't changed a whole lot since Gautham and I originally wrote it: https://github.com/jart/cosmopolitan/blob/master/tool/net/lj... I feel perfectly comfortable calling C++11 "classic" or even "baroque"…
    comment by jart · 2024-11-14 · in JSON for Classic C++
  44. Use Plinko https://github.com/jart/cosmopolitan/tree/master/tool/plinko Back in the 1980s it was my greatest ambition to go on The Price Is Right and play Plinko. However all I could accomplish was making this cursed programming language…
  45. …But some changes to ld.bfd ended up breaking that. Now I have to use these custom defines like https://github.com/jart/cosmopolitan/blob/706cb6631021bbe7b1... and https://github.com/jart/cosmopolitan/blob/706cb6631021bbe7b1... and…
  46. …involved, it is inevitably a hack with questionable long-term stability prospects. Case in point: https://github.com/jart/cosmopolitan/blob/master/libc/sysv/s... The system call numbers of all the unixlikes are bitwise packed into a single…
    comment by matheusmoreira · 2024-10-03 · in The Fastest Mutexes
  47. …a specification for APE that documents this file format, its ABI, and its historical encodings. https://github.com/jart/cosmopolitan/blob/master/ape/specifi... One day in the future, when we have the support of major OSes for the native…
    comment by jart · 2024-10-03 · in The Fastest Mutexes
  48. …enough for this purpose), nor did it ever have universal first-class OS support. And stuff like https://github.com/jart/cosmopolitan/issues/1263 shows that just because it works today, it doesn't mean that it'll work tomorrow. What's the…
    comment by int_19h · 2024-10-03 · in The Fastest Mutexes
  49. …find an opportunity to dive into another rabbit hole. Even ones as seemingly unimportant as clocks: https://github.com/jart/cosmopolitan/commit/dd8544c3bd7899ad...
    comment by jart · 2024-10-02 · in The Fastest Mutexes
  50. …of those too? A separate question -- is using the upstream nsync as safe as using your fork? [1] https://github.com/jart/cosmopolitan/commits/master/third_pa...
    comment by 1st1 · 2024-10-02 · in The Fastest Mutexes