{"slug": "cosmopolitan", "name": "Cosmopolitan", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "C library for building single executables that run natively on many operating systems.", "recommenders": 6, "commenters": 6, "warners": 0, "score": 5.498, "rising": -0.64, "first": "2025-12-30", "latest": "2026-10-11", "why": "Liked for building single binaries that run across Linux, Mac, Windows and BSDs, and seen as a fascinating portable C library behind redbean.", "why_is_quote": false, "has_verdict": true, "sentiment": {"recommend": 6, "neutral": 0, "compare": 0, "warn": 0}, "spark": [0, 1, 0, 0, 0, 0, 0, 3, 1, 0, 0, 1], "listed": true, "loved": ["Cross-platform binaries", "Pairs with redbean"], "caveat": "Expired certificates", "short_quote": "Cosmopolitan Libc has since integrated the bits to make OpenGL work in cross-platform binaries and it's awesome.", "icon": false, "domain": null, "github_repo": "github.com/jart/cosmopolitan", "official_url": "https://justine.lol/cosmopolitan/", "pricing": "open source", "aliases": ["Cosmopolitan", "Cosmopolitan Libc"], "verdict": [{"text": "Liked for building single binaries that run across Linux, Mac, Windows and BSDs", "cites": [{"id": 785201072, "item_id": 49075067, "url": "https://news.ycombinator.com/item?id=49075067", "by": "zie", "date": "2026-07-27", "stance": "recommend", "quote": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python.", "excerpt": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python. Yes, cross platform binaries. The binaries run \"natively on Linux + Mac + Windows + FreeBSD + OpenBSD 7.3 + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.\" * Python Source: https://github.com/jart/cosmopolitan/tree/master/third_party/python * Python Binary: https://cosmo.zip/pub/cosmos/bin/pyth", "context": "", "use_case": "cross-platform Python binaries", "switched_from": "", "story": "Self-contained highly-portable Python distributions"}, {"id": 777177505, "item_id": 48573594, "url": "https://news.ycombinator.com/item?id=48573594", "by": "jacereda", "date": "2026-06-17", "stance": "recommend", "quote": "Cosmopolitan Libc has since integrated the bits to make OpenGL work in cross-platform binaries and it's awesome.", "excerpt": "I used this one in 2022 to make a proof of concept for a build once / run anywhere graphical app and IIRC the library was quite nice, even if a bit limited. The resulting kludge is at https://github.com/jacereda/cosmogfx and there's a prebuilt binary that should run on Linux, Windows and some BSDs. https://github.com/jacereda/cosmogfx/releases/download/v0.0.1-alpha/demo.com Cosmopolitan Libc has since integrated the ", "context": "", "use_case": "cross-platform binaries", "switched_from": "", "story": "MicroUI \u2013 A tiny, portable, immediate-mode UI library written in ANSI C"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}]}, {"text": ", and seen as a fascinating portable C library behind redbean.", "cites": [{"id": 774847921, "item_id": 48427995, "url": "https://news.ycombinator.com/item?id=48427995", "by": "arcanemachiner", "date": "2026-06-06", "stance": "recommend", "quote": "the portable C library used to create it, which is also fascinating", "excerpt": "You just helped to dredge up a memory, which brought me back to this fascinating project: https://redbean.dev If this piques your interest, make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan", "context": "", "use_case": "portable C library", "switched_from": "", "story": "Zeroserve: A zero-config web server you can script with eBPF"}, {"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}, {"id": 742942514, "item_id": 46433907, "url": "https://news.ycombinator.com/item?id=46433907", "by": "bobajeff", "date": "2025-12-30", "stance": "recommend", "quote": "This reminds me of projects like asahi and cosmopolitan c.", "excerpt": "I like this idea and know at least a few who would love to use this if you can solve for the: 'unfortunate rough edges that people only tolerate because they use WINE as a last resort' Whether those rough edges will ever be ironed out is a matter I'll leave to other people. But I love that someone is attempting this just because of the tenacity it shows. This reminds me of projects like asahi and cosmopolitan c. Now ", "context": "", "use_case": "", "switched_from": "", "story": "Win32 is the stable Linux ABI"}]}, {"text": " The main caveat raised is expired TLS certificates on related project sites", "cites": [{"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}]}, {"text": ", with redbean reportedly scrubbed from GitHub.", "cites": [{"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}]}], "praise": [{"label": "Cross-platform binaries", "summary": "One build produces binaries that run natively on Linux, Mac, Windows and several BSDs.", "quotes": [{"id": 785201072, "item_id": 49075067, "url": "https://news.ycombinator.com/item?id=49075067", "by": "zie", "date": "2026-07-27", "stance": "recommend", "quote": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python.", "excerpt": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python. Yes, cross platform binaries. The binaries run \"natively on Linux + Mac + Windows + FreeBSD + OpenBSD 7.3 + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.\" * Python Source: https://github.com/jart/cosmopolitan/tree/master/third_party/python * Python Binary: https://cosmo.zip/pub/cosmos/bin/pyth", "context": "", "use_case": "cross-platform Python binaries", "switched_from": "", "story": "Self-contained highly-portable Python distributions"}, {"id": 777177505, "item_id": 48573594, "url": "https://news.ycombinator.com/item?id=48573594", "by": "jacereda", "date": "2026-06-17", "stance": "recommend", "quote": "Cosmopolitan Libc has since integrated the bits to make OpenGL work in cross-platform binaries and it's awesome.", "excerpt": "I used this one in 2022 to make a proof of concept for a build once / run anywhere graphical app and IIRC the library was quite nice, even if a bit limited. The resulting kludge is at https://github.com/jacereda/cosmogfx and there's a prebuilt binary that should run on Linux, Windows and some BSDs. https://github.com/jacereda/cosmogfx/releases/download/v0.0.1-alpha/demo.com Cosmopolitan Libc has since integrated the ", "context": "", "use_case": "cross-platform binaries", "switched_from": "", "story": "MicroUI \u2013 A tiny, portable, immediate-mode UI library written in ANSI C"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}]}, {"label": "Pairs with redbean", "summary": "Commenters point to it as the library behind redbean and suggest using the two together.", "quotes": [{"id": 774847921, "item_id": 48427995, "url": "https://news.ycombinator.com/item?id=48427995", "by": "arcanemachiner", "date": "2026-06-06", "stance": "recommend", "quote": "the portable C library used to create it, which is also fascinating", "excerpt": "You just helped to dredge up a memory, which brought me back to this fascinating project: https://redbean.dev If this piques your interest, make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan", "context": "", "use_case": "portable C library", "switched_from": "", "story": "Zeroserve: A zero-config web server you can script with eBPF"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}, {"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}]}, {"label": "Fascinating project", "summary": "Commenters call the portable C library fascinating and admire its tenacity.", "quotes": [{"id": 774847921, "item_id": 48427995, "url": "https://news.ycombinator.com/item?id=48427995", "by": "arcanemachiner", "date": "2026-06-06", "stance": "recommend", "quote": "the portable C library used to create it, which is also fascinating", "excerpt": "You just helped to dredge up a memory, which brought me back to this fascinating project: https://redbean.dev If this piques your interest, make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan", "context": "", "use_case": "portable C library", "switched_from": "", "story": "Zeroserve: A zero-config web server you can script with eBPF"}, {"id": 742942514, "item_id": 46433907, "url": "https://news.ycombinator.com/item?id=46433907", "by": "bobajeff", "date": "2025-12-30", "stance": "recommend", "quote": "This reminds me of projects like asahi and cosmopolitan c.", "excerpt": "I like this idea and know at least a few who would love to use this if you can solve for the: 'unfortunate rough edges that people only tolerate because they use WINE as a last resort' Whether those rough edges will ever be ironed out is a matter I'll leave to other people. But I love that someone is attempting this just because of the tenacity it shows. This reminds me of projects like asahi and cosmopolitan c. Now ", "context": "", "use_case": "", "switched_from": "", "story": "Win32 is the stable Linux ABI"}]}, {"label": "Bundled Python", "summary": "It ships a cross-platform Python binary that can reportedly run zipped .py files.", "quotes": [{"id": 785201072, "item_id": 49075067, "url": "https://news.ycombinator.com/item?id=49075067", "by": "zie", "date": "2026-07-27", "stance": "recommend", "quote": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python.", "excerpt": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python. Yes, cross platform binaries. The binaries run \"natively on Linux + Mac + Windows + FreeBSD + OpenBSD 7.3 + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.\" * Python Source: https://github.com/jart/cosmopolitan/tree/master/third_party/python * Python Binary: https://cosmo.zip/pub/cosmos/bin/pyth", "context": "", "use_case": "cross-platform Python binaries", "switched_from": "", "story": "Self-contained highly-portable Python distributions"}]}, {"label": "OpenGL support", "summary": "It has integrated support for OpenGL in cross-platform binaries.", "quotes": [{"id": 777177505, "item_id": 48573594, "url": "https://news.ycombinator.com/item?id=48573594", "by": "jacereda", "date": "2026-06-17", "stance": "recommend", "quote": "Cosmopolitan Libc has since integrated the bits to make OpenGL work in cross-platform binaries and it's awesome.", "excerpt": "I used this one in 2022 to make a proof of concept for a build once / run anywhere graphical app and IIRC the library was quite nice, even if a bit limited. The resulting kludge is at https://github.com/jacereda/cosmogfx and there's a prebuilt binary that should run on Linux, Windows and some BSDs. https://github.com/jacereda/cosmogfx/releases/download/v0.0.1-alpha/demo.com Cosmopolitan Libc has since integrated the ", "context": "", "use_case": "cross-platform binaries", "switched_from": "", "story": "MicroUI \u2013 A tiny, portable, immediate-mode UI library written in ANSI C"}]}], "caveats": [{"label": "Expired certificates", "summary": "TLS certificates for redbean.dev and the author's website had expired.", "quotes": [{"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}]}, {"label": "Redbean availability", "summary": "One commenter says redbean seems to have been scrubbed from GitHub.", "quotes": [{"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}]}], "who": [], "tags": ["for build-once-run-anywhere apps", "for portable C development", "for portable Python binaries"], "use_cases": ["portable executables / unikernel-like", "cross-platform python binaries", "cross-platform binaries", "portable self-executable binaries", "portable c library"], "compared": [{"slug": "redbean", "name": "redbean", "co": 3, "switched_from": 0, "switched_to": 0}], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=50033357", "title": "Unikernels were hard. key word: were", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=49073942", "title": "Self-contained highly-portable Python distributions", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48569205", "title": "MicroUI \u2013 A tiny, portable, immediate-mode UI library written in ANSI C", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48529990", "title": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48425723", "title": "Zeroserve: A zero-config web server you can script with eBPF", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=46433035", "title": "Win32 is the stable Linux ABI", "mentions": 1}], "sentiment_by_month": {"2025-11": {}, "2025-12": {"recommend": 1}, "2026-01": {}, "2026-02": {}, "2026-03": {}, "2026-04": {}, "2026-05": {}, "2026-06": {"recommend": 3}, "2026-07": {"recommend": 1}, "2026-08": {}, "2026-09": {}, "2026-10": {"recommend": 1}}, "quotes": [{"id": 800642416, "item_id": 50040151, "url": "https://news.ycombinator.com/item?id=50040151", "by": "simpaticoder", "date": "2026-10-11", "stance": "recommend", "quote": "It may be time to revisit cosmopolitan (https://github.com/jart/cosmopolitan) and redbean", "excerpt": "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).", "context": "", "use_case": "portable executables / unikernel-like", "switched_from": "", "story": "Unikernels were hard. key word: were"}, {"id": 785201072, "item_id": 49075067, "url": "https://news.ycombinator.com/item?id=49075067", "by": "zie", "date": "2026-07-27", "stance": "recommend", "quote": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python.", "excerpt": "There is also the APE/Cosmopolitan cross platform binaries, which includes a python. Yes, cross platform binaries. The binaries run \"natively on Linux + Mac + Windows + FreeBSD + OpenBSD 7.3 + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable.\" * Python Source: https://github.com/jart/cosmopolitan/tree/master/third_party/python * Python Binary: https://cosmo.zip/pub/cosmos/bin/pyth", "context": "", "use_case": "cross-platform Python binaries", "switched_from": "", "story": "Self-contained highly-portable Python distributions"}, {"id": 777177505, "item_id": 48573594, "url": "https://news.ycombinator.com/item?id=48573594", "by": "jacereda", "date": "2026-06-17", "stance": "recommend", "quote": "Cosmopolitan Libc has since integrated the bits to make OpenGL work in cross-platform binaries and it's awesome.", "excerpt": "I used this one in 2022 to make a proof of concept for a build once / run anywhere graphical app and IIRC the library was quite nice, even if a bit limited. The resulting kludge is at https://github.com/jacereda/cosmogfx and there's a prebuilt binary that should run on Linux, Windows and some BSDs. https://github.com/jacereda/cosmogfx/releases/download/v0.0.1-alpha/demo.com Cosmopolitan Libc has since integrated the ", "context": "", "use_case": "cross-platform binaries", "switched_from": "", "story": "MicroUI \u2013 A tiny, portable, immediate-mode UI library written in ANSI C"}, {"id": 776513024, "item_id": 48532064, "url": "https://news.ycombinator.com/item?id=48532064", "by": "soulofmischief", "date": "2026-06-14", "stance": "recommend", "quote": "it would be cool to see something like this which uses Cosmopolitan Libc + redbean", "excerpt": "Cool project! I know it's written in go, but it would be cool to see something like this which uses Cosmopolitan Libc + redbean or something similar to create a binary 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 website, just ig", "context": "", "use_case": "portable self-executable binaries", "switched_from": "", "story": "Show HN: Kage \u2013 Shadow any website to a single binary for offline viewing"}, {"id": 774847921, "item_id": 48427995, "url": "https://news.ycombinator.com/item?id=48427995", "by": "arcanemachiner", "date": "2026-06-06", "stance": "recommend", "quote": "the portable C library used to create it, which is also fascinating", "excerpt": "You just helped to dredge up a memory, which brought me back to this fascinating project: https://redbean.dev If this piques your interest, make sure to check out the portable C library used to create it, which is also fascinating: https://github.com/jart/cosmopolitan", "context": "", "use_case": "portable C library", "switched_from": "", "story": "Zeroserve: A zero-config web server you can script with eBPF"}, {"id": 742942514, "item_id": 46433907, "url": "https://news.ycombinator.com/item?id=46433907", "by": "bobajeff", "date": "2025-12-30", "stance": "recommend", "quote": "This reminds me of projects like asahi and cosmopolitan c.", "excerpt": "I like this idea and know at least a few who would love to use this if you can solve for the: 'unfortunate rough edges that people only tolerate because they use WINE as a last resort' Whether those rough edges will ever be ironed out is a matter I'll leave to other people. But I love that someone is attempting this just because of the tenacity it shows. This reminds me of projects like asahi and cosmopolitan c. Now ", "context": "", "use_case": "", "switched_from": "", "story": "Win32 is the stable Linux ABI"}]}