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
20082026
-
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…
comment by noman-land · 2024-09-21 · in Forget ChatGPT: why researchers now run small AIs on their laptops -
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 -
…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 -
…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
comment by tazu · 2024-08-19 · in Parsing protobuf at 2+GB/s: how I learned to love tail calls in C (2021) -
That issue was fixed last month. I've freshened up the cocmd binary for you! https://github.com/jart/cosmopolitan/commit/e18fe1e1127f30db...
comment by jart · 2024-07-28 · in Pnut: A C to POSIX shell compiler you can trust -
…designer ?) experience. [1]: https://github.com/hypered/slab/blob/main/content/reference.... [2]: https://github.com/jart/cosmopolitan
comment by thu · 2024-07-26 · in Show HN: Slab – A programmable markup language for generating HTML -
…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…
comment by Y_Y · 2024-07-24 · in Pnut: A C to POSIX shell compiler you can trust -
…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…
comment by hnlmorg · 2024-07-24 · in Pnut: A C to POSIX shell compiler you can trust -
…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 -
…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…
comment by xelxebar · 2024-07-21 · in A Linux kernel syscall implementation tracker -
…https://www.youtube.com/watch?v=9qljpi5jiMQ [2] https://github.com/supriyo-biswas/static-builds [3] https://github.com/jart/cosmopolitan/
comment by supriyo-biswas · 2024-06-25 · in What scripting languages come out of the box on Debian 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 -
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 -
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 -
…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 -
…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 -
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 -
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 -
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 -
…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 -
…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...
comment by jart · 2024-05-17 · in NetBSD bans all commits of AI-generated code -
…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]…
comment by ingenieroariel · 2024-04-15 · in A proof-of-concept Python executable built on Cosmopolitan Libc (2021) -
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 -
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 -
…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…
comment by jrockway · 2024-03-23 · in Pack: A new container format for compressed files -
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…
comment by arwalk · 2024-03-08 · in Ask HN: What underrated open source project deserves more recognition? -
…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 -
It'd be nice to try to build this with Cosmopolitan https://github.com/jart/cosmopolitan
comment by zxspectrum1982 · 2024-01-13 · in AsmBB – a lightweight web forum engine written in assembly language -
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
comment by erwan577 · 2024-01-09 · in Show HN: Auto Wiki – Turn your codebase into a Wiki -
FWIW there is ongoing work with good progress to add websocket support to redbean ( https://github.com/jart/cosmopolitan/pull/967 )
comment by paulclinger · 2024-01-07 · in Libwebsockets: pure C library for http, websockets, MQTT -
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? -
…Mac, Windows, FreeBSD, OpenBSD, NetBSD, and bare metal (BIOS boot). I would call that portable. [0] https://github.com/jart/cosmopolitan
comment by isp · 2023-12-27 · in Show HN: CuteVim – Portable Vim with a cute vimrc -
…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...
comment by delijati · 2023-12-13 · in Show HN: PyApp – runtime installer for Python applications -
> 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 -
…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
comment by montyanderson · 2023-12-02 · in Ask HN: What are some unpopular technologies you wish people knew more about? -
…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.…
comment by modeless · 2023-11-30 · in Llamafile lets you distribute and run LLMs with a single file -
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 -
Real link: https://github.com/jart/cosmopolitan/releases/tag/3.1
comment by bmacho · 2023-11-20 · in Cosmopolitan v3.1 -
…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 -
Good news: https://github.com/jart/cosmopolitan/commit/5e8c928f1a37349a...
comment by dylukes · 2023-11-04 · in Cosmopolitan Third Edition -
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 -
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 -
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 -
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 -
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 -
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 -
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 -
…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 -
…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…
comment by jart · 2023-08-21 · in Transcoding Latin 1 strings to UTF-8 strings at 12 GB/s using AVX-512 -
…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)…
comment by paulclinger · 2023-07-14 · in Patching GCC to build Actually Portable Executables