Skip to content

Releases: jart/cosmopolitan

Cosmopolitan v3.9.0

16 Sep 06:18
56ca00b
Compare
Choose a tag to compare

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/

Improvements

Cosmopolitan now has a bespoke speaker / microphone audio API.

  • dc579b7 Productionize polished cosmoaudio library
  • 0f3457c Add debug log to cosmoaudio and add examples
  • 5d3b91d Get printvideo audio working on Windows and MacOS
  • d1157d4 Upgrade pl_mpeg

There have been significant quality of life improvements for Windows.

  • e65fe61 Fix shocking memory leak on Windows
  • fbdf9d0 2ec413b cceddd2 Rewrite Windows poll()
  • acd6c32 Rewrite Windows accept()
  • e142124 Rewrite Windows connect()
  • 6b10f4d Fix ioctl() and FIONREAD for sockets on Windows
  • 58d252f Support more keystrokes in DECCKM mode
  • 03875be Add missing ICANON features
  • c260144 Introduce sigtimedwait() on Windows
  • baf70af Make read() and write() signal handling atomic
  • c3482af Fix file descriptor assignment issues on Windows
  • 79516bf Improve handling of weird reparse points
  • 39e7f24 Fix handling of paths with dirfd on Windows
  • 462ba69 Speed up unnamed POSIX semaphores
  • a5c0189 Make vim startup faster
  • deb5e07 Remove exponential backoff from chdir()
  • 51c0f44 Fix rare corner case in ntspawn.c (#1284)
  • 5469202 Get monorepo fully building on Windows again
  • b73673e Freshen bootstrap binaries

Bug fixes to cosmo libc system calls:

  • dd8544c Delve into clock rabbit hole

Multi-threading is now better:

  • 2f48a02 Make recursive mutexes faster
  • 3c61a54 Introduce pthread_condattr_setclock()
  • 90460ce Make Cosmo mutexes competitive with Apple Libc
  • cca0edd Make pthread library internal mutex non-recursive

There have been improvements to your cosmocc toolchain:

  • d99f066 Add clang-format to cosmocc toolchain
  • 1e9902a Support merging many .a files into one .a file
  • 41fc76c Fix apelink reproducible deterministic build bug

Bug fixes and improvements to the cosmo libc strings library:

  • 7c83f4a wcsstr() is now linearly complex
  • 7c83f4a strstr16() is now linearly complex
  • 7c83f4a strstr() is now vectorized on aarch64 (10x)
  • 7c83f4a strstr() now uses KMP on pathological cases
  • 7c83f4a memmem() is now vectorized on aarch64 (10x)
  • 7c83f4a memmem() now uses KMP on pathological cases
  • 7c83f4a Make iswlower(), iswupper() consistent with glibc
  • 7c83f4a Remove figure space from iswspace() implementation
  • 7c83f4a Include line and paragraph separator in iswcntrl()
  • 7c83f4a Use Musl wcwidth(), iswalpha(), iswpunct(), towlower(), towupper()

CTL now has a fast shared pointer implementation for C++ users.

There have been many improvements to the printf() family of functions.

  • e260d90 Fix 0 before decimal-point in hex float printf fns (#1297)
  • 81bc8d0 Fix printing decimal-point character on printf %#a (#1296)
  • b55e4d6 Hopefully completely fix printf-family %a rounding (#1287)
  • 675abfa Add POSIX's apostrophe flag for printf-based funcs (#1285)
  • e3d28de Fix UB in gdtoa hexadecimal float scanf and strtod (#1288)
  • 7f21547 Fix occasional crash in test/libc/intrin/mmap_test (#1289)
  • 19563d3 Make the pledge sandbox .so object work with UBSAN (#1290)
  • 7d2c363 Fix statx not being allowed on rpath/wpath pledges (#1291)
  • 4d05060 Partially fix printf hex float numbers/%a rounding (#1286)
  • 4754f20 Fix printf-family long double prec/rounding issues (#1283)
  • f882887 Fix ecvt/fcvt issues w.r.t. value==0 and ndigit==0 (#1282)
  • c66abd7 Implement length modifiers for printf %n conv spec (#1278)
  • 8f81451 Add POSIX's C conversion specifier to printf funcs (#1276)
  • a089c07 Fix printf funcs on memory pressure with floats (#1275)
  • 75e161b Fix printf-family functions on long double inf (#1273)

Other improvements:

  • ecbf453 Upgrade to superconfigure z0.0.55
  • 6397999 Fix unicode look-alike in define (#1294)
  • b5fcb59 Implement more bf16/fp16 compiler runtimes
  • ed1f992 Fix default open mode in redbean unix.open()
  • 389d565 Use unsigned-signed conversion for refs test (#1272)
  • 48b703b Minor cleanup/improvements in unique_ptr_test (#1266)

Cosmopolitan v3.8.0

31 Aug 03:52
c9152b6
Compare
Choose a tag to compare

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.

  • ca2c30c Release redbean v3.0.0
  • 884d892 Harden against aba problem
  • f3ce684 Fix getpeername() bug on Windows
  • 185e957 Detect implicit function declarations
  • 8e14b27 Make fread() more consistent with glibc
  • c9152b6 Add experimental support for cosmocc -mclang
  • c9152b6 Switch C++ exception handling from SJLJ to DWARF
  • c9152b6 int_fast16_t and int_fast32_t are now always 32-bit
  • 6baf6cd Fix printf badly handling +/` flag conflict (#1269)
  • 77be460 Make Windows REPLs great again
  • 60e697f Move LoadZipArgs() to cosmo.h
  • 2d44142 Get Meson builds working
  • 908b7a8 Add VSCode settings
  • 2eda509 Add stdfloat header
  • 12ecaf8 Modernize ipv4.games server
  • ebe1cbb Add crash proofing to ipv4.games server
  • bb06230 Avoid linker conflicts on DescribeFoo symbols
  • 1a9f82b Romanize Hindi, Yiddish, Arabic, Cyrillic, etc.
  • eb6e96f Change InfoZIP to not auto-append .zip to pathname
  • 4389f47 Expose wmempcpy() to _GNU_SOURCE
  • 5b98629 Delete superfluous function

Cosmopolitan v3.7.1

16 Aug 19:07
732554c
Compare
Choose a tag to compare
  • 914d521 Fix relative Windows path normalization (#1261)
  • 11d9fb5 Make atomics faster on aarch64

Cosmopolitan v3.7.0

16 Aug 15:09
de0cde8
Compare
Choose a tag to compare

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/

Improvements

Your malloc() function is now more scalable on Linux Aarch64 and other
platforms, where it previously was not working as well as advertised.

  • 0a79c69 Make malloc scalable on all platforms

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.

  • 3f26dfb Share file offset across execve() on Windows
  • 761c6ad Share file offset across processes

Improvements have been made to cosmocc and libcxx which made it possible
for us to compile Clang as an APE binary.

  • 77d3a07 Fix std::filesystem
  • 0d7c272 Don't use sendfile() in libcxx
  • 18964e5 Fix remove() directory on Windows
  • 6ac3d3b Add precompiled header support to cosmocc
  • f8cfc89 Allow -c to be specified with -E in cosmocc
  • 01b09bc Support printf %n directive
  • 3dab207 Remove mkfifo() prototype
  • d0360bf Introduce cosmoranlib

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.

  • bb815ea Update Musl Libc code
  • ff1a0d1 Upgrade to superconfigure z0.0.51
  • 3fd275f Import optimized routines changes to exp10
  • d40acc6 Detect more x86 features

Additional Changes

  • a80ab3f Implement bf16 compiler runtime library
  • 8d8aecb Avoid legacy instruction penalties on x86
  • 24666e1 Add nightly cosmocc (artifact) builds (#1254)
  • 3119416 Remove .internal from more header filenames
  • 7499367 Ignore -Wimplicit-function-declaration in cosmocc
  • 9ebacb7 Convert GCC 14 errors back to warnings (#1247)
  • e18fe1e Freshen build/bootstrap/cocmd
  • cf1559c Remove __threaded variable

Cosmopolitan v3.6.2

28 Jul 03:43
8621034
Compare
Choose a tag to compare

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.

  • 642e9cb Introduce cosmocc flags -mdbg -mtiny -moptlinux

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.

  • cdfcee5 Properly serialize fork() operations

Some additional improvements:

  • 59692b0 Make spinlocks faster
  • 18a620c Make some improvements of little consequence
  • 690d3df Expand the virtual address space on Windows
  • edd5e2c Expose gethostbyname()
  • a31d5ea Remove cosmoc++ compiler warning

Cosmopolitan v3.6.1

25 Jul 21:12
7d88343
Compare
Choose a tag to compare
  • f25fbba Use libcxx abi v1
  • d3a13e8 Improve lock hierarchy
  • fbc4b03 Restore support for AMD K8
  • 2c4b887 Add special errno handling to libcxx
  • 3915ca0 Have cosmocc define -Wno-implicit-int
  • 5dd7ddb Remove bad defines from early days of project
  • e398f38 Make more improvements to threads and mappings
  • 7ba9a73 Remove more _Atomic keywords from public headers
  • 1020dd4 bzero() should be defined without special defines

Cosmopolitan v3.6.0

23 Jul 10:35
5660ec4
Compare
Choose a tag to compare
  • This release performs an atomic upgrade to GCC 14.1.0. It features N-bit integer types.
  • This release upgrades libcxx to the latest code at HEAD from the LLVM project.
  • The mono repo now uses GNU C23 and C++23.

Cosmopolitan v3.5.9

23 Jul 04:14
62ace36
Compare
Choose a tag to compare

Cosmopolitan v3.5.8

22 Jul 00:19
e08a4cd
Compare
Choose a tag to compare
  • 30afd6d Improve multithreading
  • 7ebaff3 Fix ctype.h and wctype.h
  • d316712 Fix regression with last commit
  • e7be5a5 Upgrade to latest superconfigure
  • 29ce25c Start writing formal specification for APE

Cosmopolitan v3.5.7

20 Jul 10:58
7996bf6
Compare
Choose a tag to compare
  • 626a5d0 Add missing lock statement
  • 527aaa4 Prevent MODE=tiny ShowCrashReports() looping