Just started to add UTF-8 support to libstr, my libc-free string manipulation library written in C

Find the repository on Codeberg: https://codeberg.org/ayba/libstr

#c2y #defer #libc #codeberg

libstr

A library for operating strings.

Codeberg.org
@JensGustedt @wdtz So #C23 adds #memalignment (), defined in <stdlib.h> as a regular function (think side-effects and correctness); it takes the 2's complement negation of the input expressed as a #uintptr_t and masks it against the input. https://cgit.freebsd.org/src/tree/lib/libc/stdlib/memalignment.c #FreeBSD picks it up in #libc from 15.1 and up, so it won't be in the man index until the release: https://www.freebsd.org/releases/15.1R/schedule/ #languagelawyering
memalignment.c « stdlib « libc « lib - src - FreeBSD source tree

What happens when you point Rust at Cosmopolitan libc and ask cargo to produce ONE binary for six OSes? I spent a few weeks finding out 🔬

✅ Sync Rust crosses Linux x86_64/arm64, macOS, FreeBSD, OpenBSD, Windows from a single binary (ripgrep + dog ported).

❌ Async Rust is Linux-only — mio's reactor requires too much love.

14 findings, 12 fixed. Full writeup:
https://blog.crisidev.org/tags/series-one-bin-to-rule-them-all/

#rust #rustlang #cosmopolitan #libc #linux

series:one-bin-to-rule-them-all — crisidev

6 posts tagged series:one-bin-to-rule-them-all

crisidev

#malloc and #realloc being able to return NULL when given a size of 0 is a discontinuity in design, and a mistake, IMO.

#programming #C #libc

🐢💤 Oh wow, hold the phone everyone! The #GNU #libc #atanh is now "correctly rounded"—a riveting #update surely to shake the very foundations of #digital #arithmetic. 📈😴 Meanwhile, the entire planet remains blissfully unaware, as another groundbreaking #breakthrough is drowned in a sea of #jargon and #PDFs. 📚🔍
https://inria.hal.science/hal-05591661 #HackerNews #ngated
The GNU libc atanh is correctly rounded

<div><p>We prove the binary64 hyperbolic arc-tangent function from GNU libc 2.43, released end of January 2026, is correctly rounded.</p></div>

The GNU libc atanh is correctly rounded

<div><p>We prove the binary64 hyperbolic arc-tangent function from GNU libc 2.43, released end of January 2026, is correctly rounded.</p></div>

Hi #embedded developers, hi #c developers. I am writing a new #libc to explore alternative idioms and hopefully improve ergonomy, expressiveness, and some other points that seem important to me.

I am considering adding a generic interface for allocators, so the default behaviour can be easily overridden by users and third parties, like #zig or #odin.

This pattern could be expanded to features other than allocators, but I'm struggling to decide which ones can be relevant.

#linux #bsd #windows

Why is there no std::move_only_function in libc++? 😭😭😭
I know there is a pull request since 2024, but I have no idea when or even if it will ever get merged.

I just wanna be able to finally use import std; with libc++ in all my projects.


#C++ #cpp #LLVM #libc++ #import-std

As a side project, I am working on a deep redesign of the C standard library and am contemplating blogging about it to give myself some motivation, as well as hopefully getting helpful feedback from interested enthusiasts or experienced programmers. Feel free to share this thread and ask questions, I'll be happy to answer them in my next blog post if this gets enough traction (I will post the link here on mastodon).

#programming #c #libc #c23 #c2y #clang #gcc #unix #windows #macos #plan9 #blog

Hey #Linux #Developer,
is there some #libc API that I can query on a file descriptor to get the sector size of a filesystem?

#Cpp #CSharp