HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
microsoft
lib0xc
C2026–2026
microsoft / lib0xc

lib0xc

Safe(ish) C programming library

2Distinct people
2Mentions
0Explicit recommenders
405GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Safe(ish) C programming library

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 1:49:46 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by hour2 dated mentions

Observed mentions: 2026-05-01 19:07:03 UTC to 2026-05-01 19:10:56 UTC.

0122026-05-01 19:00:00 UTC to 2026-05-01 20:00:00 UTC (exclusive): 2 mentions; 2 submissions, 0 commentsMay 1, 19:00

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC. One observed period does not establish a trend.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
May 1, 19:002026-05-01 19:00:00 UTC2026-05-01 20:00:00 UTC220

What Hacker News says

2 sources
EPWN3D·May 1, 2026Submission

Show HN: Lib0xc, the C standard library you wish you had

Various patterns for safer C programming have been cargo-culting around the industry for decades. Because the language evolves intentionally slowly, these patterns rarely get folded into the language as first-class constructs and are passed down through the generations in a sort of oral tradition of programming. lib0xc leverages GNUC extensions and C11 features to codify safer C practices and patterns into real APIs with real documentation and real testing. Reduce your casts to and from `void *` with the `context_t` tagged pointer type. Enable type-checked, deferred function invocation with `call_t`. Interrogate structure descriptors with `struct_field_t`. Stop ignoring `-Wint-conversion` and praying you won't regret it when you assign a signed integer to an unsigned integer and use `__cast_signed_unsigned`. These are just a few of lib0xc
Read the rest
's standard-library-adjacent offerings. lib0xc also provides a basic systems programming toolkit that includes logging, unit tests, a buffer object designed to deal with types, a unified Mach-O and ELF linker set, and more. Everything in lib0xc works with clang's bounds-safety extensions if they are enabled. Both gcc and clang are supported. Porting to another environment is a relatively trivial effort. It's not Rust, and it's not type safety, but it's not supposed to be. It's suppsoed to help you make your existing C codebase significantly safer than it was yesterday. My employer holds the copyright and has permitted its release under the MIT license.
1 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.