Bot releases are visible (Hide)
Published by jart about 1 month ago
Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README. Prebuilt software is available on https://cosmo.zip/
Cosmopolitan now has a bespoke speaker / microphone audio API.
There have been significant quality of life improvements for Windows.
Bug fixes to cosmo libc system calls:
Multi-threading is now better:
There have been improvements to your cosmocc toolchain:
Bug fixes and improvements to the cosmo libc strings library:
CTL now has a fast shared pointer implementation for C++ users.
There have been many improvements to the printf() family of functions.
Other improvements:
This release has important bug fixes. Your cosmocc toolchain now bundles
Clang which can reduce your C++ build latency by 3x if you pass -mclang.
Published by jart 2 months ago
Published by jart 2 months ago
Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README. Prebuilt software is available on https://cosmo.zip/
Your malloc() function is now more scalable on Linux Aarch64 and other
platforms, where it previously was not working as well as advertised.
Cosmopolitan Bash now works better on Windows. For example, if you start
a process that redirects stderr to a file, then your entire process tree
will now be able to cooperatively write to that file. When you update it
is recommended that you upgrade all your cosmos binaries at once.
Improvements have been made to cosmocc and libcxx which made it possible
for us to compile Clang as an APE binary.
Some upstream dependencies have been updated. In particular, Musl locale
handling is more true to the way it works upstream. You may need to have
setlocale(LC_ALL, "C.UTF-8")
in your main() function for certain POSIX
functions to work the same way they did previously by default.
Published by jart 3 months ago
Your cosmocc toolchain is now able to produce tinier binaries. For small
programs, passing -mtiny can cut binary size in half. In fact oftentimes
our fat binaries end up being half the size of statically linked
linux-only executables that use glibc. You can also pass -mdbg to link a
debug version of the cosmopolitan runtime.
Your cosmocc toolchain, which was recently built with GCC 14.1, is now
itself being compiled with GCC 14.1. We've also enabled the -fanalyzer
flag, which has been helping us find bugs.
Your fork() function will now go much faster when it's used by many
threads at once.
Some additional improvements:
Published by jart 3 months ago
Published by jart 3 months ago
Published by jart 3 months ago
Published by jart 3 months ago
Published by jart 3 months ago
Published by jart 3 months ago
Published by jart 3 months ago
This release perfects the new memory manager. The impact of the mmap()
rewrite (introduced by Cosmo v3.5.0) is that LLaMAfiler's tokenization
endpoint was previously handling 2 million requests per second and now
it's handling 3.3 million per second.
A few disruptive changes slipped in, but they're necessary. Aside from
the changes listed below, please note that you might need to update your
code to use sysconf(_SC_GRANSIZE)
instead of sysconf(_SC_PAGESIZE)
when the alignment of the addr
or offset
parameters to mmap()
is
the thing you care about.
Other changes:
Published by jart 4 months ago
Published by jart 4 months ago
Your cosmocc toolchain now includes five new useful programs: ar.ape,
sha256sum.ape, resymbol, and cocmd. See ca4cf67eb for further details.
This release fixes Android support. You can now run LLMs on your phone
using Cosmopolitan software like llamafile. See 78d3b86ec for further
details. Thank you @aj47 (techfren.net) for bug
reports and and testing efforts.
We've worked out additional kinks in our new mmap() runtime, which now
has a more bulletproof locking strategy. See 1bf2d8e30 for details.
This release fixes a Windows regression that was introduced in the last
release, where programs that need a lot of thread_local
storage would
crash very early during initialization. See e437bed00 for details.
Newly discovered issues in Cosmo's POSIX threads runtime have been
addressed. It's now possible to cancel a thread that was created by a
canceled thread. Keys now destruct atomically within a thread, out of an
abundance of paranoia w.r.t. signal safety. Thread destructor function
names are also now logged to --strace. It's a boon for debuggability.
See 76957983c for further details.
We invented a new non-POSIX API named pthread_decimate_np() which forces
the runtime to garbage collect zombie threads. It can be used alongside
pthread_orphan_np() to block until detached threads have exited, so it's
safe to CheckForMemoryLeaks(). See 4cb5e21ba for further details.
We've also added more preliminary content to the Cosmopolitan Templates
Library, which is an STL replacement that has 10x faster build times.
Published by jart 4 months ago
Published by jart 4 months ago
Published by jart 4 months ago
Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README.
We now have a higher quality memory map implementation.
We've made a lot of progress reinventing the C++ STL.
We've been making improvements to our GitHub development process.
Published by jart 5 months ago
Cosmopolitan Libc makes C a build-once run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows + FreeBSD + OpenBSD + NetBSD + BIOS with the best possible performance and the tiniest footprint imaginable. For further details, read Cosmopolitan Third Edition, the Cosmo README, and the Cosmopolitan Toolchain README.
This release makes dlmalloc scalable and zlib crc32 faster. Enterprise
server applications that employ many threads on many cores can now
look upon Cosmopolitan as a serious and viable option for their needs.
This release fixes some showstopper issues on Windows.
This release brings a more modern standard library for C++. It compiles
slower, but in certain cases that can be worked around since it defines
"breakout" headers for individual functions, e.g. std::move(). Since it
goes so slow, we're experimenting with creating our own STL replacement
Our --ftrace
function call logger now demangles C++ symbols. This is
thanks to revisions we've made to our FreeBSD demangler that makes it
lockless and reentrant so it's safe to call from signal handlers. It's not as
good as the libcxxabi demangler, but that doesn't make it unimpressive.
For example, calling kprintf("%t", sym)
successfully demangles 90% of
the symbols in the llamafile codebase. Usually when it doesn't work, it's
because a symbol is very very long. Since it's run when nops are hooked
in function prologues, it has to be part of the privileged cosmo runtime,
which is highly constrained and can only use fixed size stack buffers.
Additional improvements:
Finally, this release sunsets the cosmopolitan amalgamation.
Published by jart 5 months ago
Published by jart 5 months ago