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. llamafile will run on all architectures because it is compiled by cosmopolitan. https://github.com/jart/cosmopolitan "Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual…
  2. This is most likely what is being referenced: https://github.com/jart/cosmopolitan/blob/master/Makefile I like how the includes are separated and commented. Also if you weren't already familiar with their work you might be interested in…
    comment by Drawde · 2024-09-21 · in I Like Makefiles
  3. …Think of it like gradlew( the gradle bash/bat wrapper) but completely self contained and air gapped https://github.com/jart/cosmopolitan
    comment by weitzj · 2024-09-20 · in Zb: An Early-Stage Build System
  4. …like an exercise in sovereignty: ultimate freedom (and danger). [1]: https://justine.lol/ [2]: https://github.com/jart/cosmopolitan [3]: https://news.ycombinator.com/item?id=26271117
  5. That issue was fixed last month. I've freshened up the cocmd binary for you! https://github.com/jart/cosmopolitan/commit/e18fe1e1127f30db...
  6. …designer ?) experience. [1]: https://github.com/hypered/slab/blob/main/content/reference.... [2]: https://github.com/jart/cosmopolitan
  7. …was based on cloning master yesterday and trying to build redbean but hitting what looks like https://github.com/jart/cosmopolitan/issues/940 Indeed it lioks like the commit you mentioned should have fixed the issue with the pointer having…
  8. …a new linker that lets you build fat binaries which can run on these platforms: AMD ... ARM64 https://github.com/jart/cosmopolitan/releases/tag/3.5.3 > This release fixes Android support. You can now run LLMs on your phone using…
  9. …For example, just using ctl::vector alone might help your C++ code compile noticeably faster. https://github.com/jart/cosmopolitan/tree/master/ctl
    comment by jart · 2024-07-22 · in Cosmopolitan v3.5.8
  10. …syscall flags, error numbers, etc. It includes (variants of) Linux, XNU, NT, and the BSDs. https://github.com/jart/cosmopolitan/blob/master/libc/sysv/c... In the off chance you haven't heard of Cosmopolitan yet, I hope you find the…
  11. …https://www.youtube.com/watch?v=9qljpi5jiMQ [2] https://github.com/supriyo-biswas/static-builds [3] https://github.com/jart/cosmopolitan/
  12. …since they've already been included but the sum total of files that get included is 694!" [1]: https://github.com/jart/cosmopolitan/blob/master/ctl/README....
    comment by simjnd · 2024-06-25 · in Cosmopolitan v3.5
  13. From here: https://github.com/jart/cosmopolitan/releases/tag/3.5.0 Justine wrote: > We've made a lot of progress reinventing the C++ STL. What is the motivation behind this? Try to reduce (compiled) binary size? Naively, I am surprised…
    comment by throwaway2037 · 2024-06-25 · in Cosmopolitan v3.5
  14. It's called cosmocc. https://github.com/jart/cosmopolitan/releases/download/3.5.1... the documentation is here: https://github.com/jart/cosmopolitan/blob/master/tool/cosmoc... and here https://justine.lol/cosmo3/#install
    comment by jart · 2024-06-24 · in Cosmopolitan v3.5
  15. …it compare in terms of performance I tried rsync for Windows from its "cosmos" pile of binaries ( https://github.com/jart/cosmopolitan/releases/download/3.3.1... ), and it was too slow to be usable compared to WSL rsync. For many other…
    comment by doctorpangloss · 2024-06-24 · in Cosmopolitan v3.5
  16. …the first line when you start the shell. There's some interesting background on it in this issue: https://github.com/jart/cosmopolitan/issues/141
    comment by simonw · 2024-06-24 · in Cosmopolitan v3.5
  17. It depends. It does not work on CentOS 8 / Rocky 8 for example: https://github.com/jart/cosmopolitan/issues/1151
    comment by Aissen · 2024-06-24 · in Cosmopolitan v3.5
  18. I checked two commits and they both had exactly the same number of chars per line, e.g. https://github.com/jart/cosmopolitan/commit/c4c812c15445f5c3... I enjoy doing this too sometimes and don't find it too difficult, but damn...
    comment by pixelpoet · 2024-06-24 · in Cosmopolitan v3.5
  19. More details of supported platforms at https://justine.lol/cosmo3/ and https://github.com/jart/cosmopolitan/blob/master/tool/cosmoc... , both linked in the release notes.
    comment by mkl · 2024-06-24 · in Cosmopolitan v3.5
  20. …code for redbean, which is a neat web server with lua and plenty of features. https://redbean.dev/ https://github.com/jart/cosmopolitan/tree/master/tool/net
    comment by speedgoose · 2024-06-24 · in Cosmopolitan v3.5
  21. …I'm using sem_open / sem_wait / etc. as my futex replacement. What abi should I be using? https://github.com/jart/cosmopolitan/blob/master/third_party...
  22. …portable binary with Python 3.11.9, brotli, ssl and asyncio for their work related project.[2] [0] https://github.com/jart/cosmopolitan/tree/master/third_party... [1] https://github.com/ahgamut/superconfigure/ [2]…
  23. Here's the code I use: https://github.com/jart/cosmopolitan/blob/master/net/http/to...
    comment by jart · 2024-04-14 · in My cat alerted me to a DDoS attack
  24. Does pinsyscall mean Cosmo will no longer work on OpenBSD? https://github.com/jart/cosmopolitan
    comment by alberth · 2024-04-05 · in OpenBSD 7.5
  25. …an unpacker. Your archive format just needs to be an executable that runs on every platform. https://github.com/jart/cosmopolitan is something that could help with that. ("Who would execute an archive? It could do anything," I hear you…
  26. Cosmopolitan https://github.com/jart/cosmopolitan and https://justine.lol/cosmopolitan/index.html Some genius realized that you can actually embed valid win32 programs inside valid posix shell scripts, and found a way to make a C…
  27. …It's easy to get started, your ideas will branch out as soon as you start playing with it. [1]: https://github.com/jart/cosmopolitan/blob/master/tool/args/a...
    comment by alganet · 2024-01-14 · in Show HN: #!/usr/bin/env docker run
  28. It'd be nice to try to build this with Cosmopolitan https://github.com/jart/cosmopolitan
  29. My repo suggestions : https://github.com/sqlite/sqlite https://github.com/jart/cosmopolitan https://github.com/dolphin-emu/dolphin https://gitlab.inria.fr/mpfr/mpfr
  30. FWIW there is ongoing work with good progress to add websocket support to redbean ( https://github.com/jart/cosmopolitan/pull/967 )
  31. Check out this comment by jart (cosmpolitan author) here: https://github.com/jart/cosmopolitan/issues/766#issuecomment... it might help but not sure how comprehensive it is! would it be a bad idea for you to check out the source code of…
    comment by keepamovin · 2024-01-03 · in Ask HN: ANSI escape sequences reference docs?
  32. …Mac, Windows, FreeBSD, OpenBSD, NetBSD, and bare metal (BIOS boot). I would call that portable. [0] https://github.com/jart/cosmopolitan
  33. …my last setup (windows) was shiv + wine + nsis (used that as pyinstaller had some issues)[2] [1] https://github.com/jart/cosmopolitan/issues/141#issuecomment... [2] https://github.com/delijati/docker-shiv#add-python-interpret...
  34. > Executables should be cross-compatible So cosmopolitan? https://github.com/jart/cosmopolitan
    comment by Grimburger · 2023-12-10 · in BSD on Windows: Things I wish I knew existed
  35. …https://github.com/monatis/clip.cpp - trurl: https://github.com/curl/trurl - cosmopolitan: https://github.com/jart/cosmopolitan - signalcli: https://github.com/AsamK/signal-cli
  36. …dynamic linking specifically to enable GPUs! This is amazing, I'm glad they found a way to do this. https://github.com/jart/cosmopolitan/commit/5e8c928f1a37349a... I see it unfortunately requires the CUDA developer toolkit to be installed.…
  37. FWIW, there is ongoing work on dlopen; it was introduced 2 weeks ago ( https://github.com/jart/cosmopolitan/commit/5e8c928f1a37349a... ) and continued after that.
    comment by paulclinger · 2023-11-20 · in Cosmopolitan v3.1
  38. Real link: https://github.com/jart/cosmopolitan/releases/tag/3.1
    comment by bmacho · 2023-11-20 · in Cosmopolitan v3.1
  39. …the same binary will run on windows, linux, mac, and BIOS. /s This has been done with Lua, see: https://github.com/jart/cosmopolitan/issues/61
    comment by jakobson14 · 2023-11-06 · in A standalone zero-dependency Lisp for Linux
  40. Good news: https://github.com/jart/cosmopolitan/commit/5e8c928f1a37349a...
    comment by dylukes · 2023-11-04 · in Cosmopolitan Third Edition
  41. Pull request sent. https://github.com/jart/cosmopolitan/pull/924 Oops, I only now realized there's a test suite. I'll be adding tests too... After I get some sleep.
    comment by matheusmoreira · 2023-11-02 · in Cosmopolitan Third Edition
  42. See the comments in https://justine.lol/ape.patch and at the bottom of https://github.com/jart/cosmopolitan/blob/3.0/tool/build/ape... and also https://github.com/jart/cosmopolitan/blob/3.0/ape/loader.c has good information too. I'm…
    comment by jart · 2023-11-02 · in Cosmopolitan Third Edition
  43. Cool. Somebody still needs to teach sscanf how to parse floats though. https://github.com/jart/cosmopolitan/issues/456 The code to do it would probably go in here: https://github.com/jart/cosmopolitan/blob/master/libc/stdio/... I mean, I…
    comment by smcameron · 2023-11-02 · in Cosmopolitan Third Edition
  44. Author here. We've got you covered. Search for `MODE=tinylinux` in the https://github.com/jart/cosmopolitan#getting-started section of the README. If you use that build mode, then hello world for x86 linux is only 8kb in size. It's very…
    comment by jart · 2023-11-01 · in Cosmopolitan Third Edition
  45. Discuss here: https://github.com/jart/cosmopolitan/discussions Add issues here: https://github.com/jart/cosmopolitan/issues
    comment by AMICABoard · 2023-11-01 · in Cosmopolitan Third Edition
  46. Yes they do! https://github.com/jart/cosmopolitan/tree/master/third_party... and https://github.com/trholding/llama2.c
    comment by AMICABoard · 2023-11-01 · in Cosmopolitan Third Edition
  47. There's so much cool stuff in this post. 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…
    comment by simonw · 2023-11-01 · in Cosmopolitan Third Edition
  48. …can even go above and beyond with cosmopolitan libc v2, which makes c/c++ build-once run-anywhere: https://github.com/jart/cosmopolitan/releases/tag/2.0 There seems to be some work getting cosmopolitan libc support in Go, but it is not…
    comment by mathiasgredal · 2023-09-17 · in Java 21 makes me like Java again
  49. …means you can write a simpler algorithm than what Lemire did that assumes an ASCII average case. https://github.com/jart/cosmopolitan/blob/755ae64e73ef5ef7d1... That goes 23 GB/s on my machine using just SSE2 (rather than AVX512). However…
  50. …old fashioned way. The recent version of cosmopolitan generates ARM binaries for Linux and MacOS ( https://github.com/jart/cosmopolitan#arm; mode aarch64). There is also blink that provides the x86-64 emulation layer for (APE and other)…