HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
zetzit
zz
Rust2020–2022
zetzit / zz · Archived

zz

🍺🐙 ZetZ a zymbolic verifier and tranzpiler to bare metal C

11Distinct people
21Mentions
0Explicit recommenders
1.6KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

🍺🐙 ZetZ a zymbolic verifier and tranzpiler to bare metal C

GitHub

Where it is used

No documented product use was verified in the last source check.

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

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:03:16 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 month21 dated mentions

Observed mentions: 2020-02-05 09:49:18 UTC to 2022-03-19 10:32:21 UTC.

0123452020-02-01 00:00:00 UTC to 2020-03-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 commentsFeb 20202020-03-01 00:00:00 UTC to 2020-04-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-04-01 00:00:00 UTC to 2020-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-05-01 00:00:00 UTC to 2020-06-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-06-01 00:00:00 UTC to 2020-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-07-01 00:00:00 UTC to 2020-08-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2020-08-01 00:00:00 UTC to 2020-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-09-01 00:00:00 UTC to 2020-10-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2020-10-01 00:00:00 UTC to 2020-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-11-01 00:00:00 UTC to 2020-12-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-12-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-01-01 00:00:00 UTC to 2021-02-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-02-01 00:00:00 UTC to 2021-03-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsFeb 20212021-03-01 00:00:00 UTC to 2021-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-04-01 00:00:00 UTC to 2021-05-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-05-01 00:00:00 UTC to 2021-06-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2021-06-01 00:00:00 UTC to 2021-07-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-07-01 00:00:00 UTC to 2021-08-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-08-01 00:00:00 UTC to 2021-09-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-09-01 00:00:00 UTC to 2021-10-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-10-01 00:00:00 UTC to 2021-11-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2021-11-01 00:00:00 UTC to 2021-12-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-12-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2022-02-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-02-01 00:00:00 UTC to 2022-03-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-03-01 00:00:00 UTC to 2022-04-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMar 2022

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

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
Feb 20202020-02-01 00:00:00 UTC2020-03-01 00:00:00 UTC514
Mar 20202020-03-01 00:00:00 UTC2020-04-01 00:00:00 UTC303
Apr 20202020-04-01 00:00:00 UTC2020-05-01 00:00:00 UTC101
May 20202020-05-01 00:00:00 UTC2020-06-01 00:00:00 UTC000
Jun 20202020-06-01 00:00:00 UTC2020-07-01 00:00:00 UTC000
Jul 20202020-07-01 00:00:00 UTC2020-08-01 00:00:00 UTC101
Aug 20202020-08-01 00:00:00 UTC2020-09-01 00:00:00 UTC000
Sep 20202020-09-01 00:00:00 UTC2020-10-01 00:00:00 UTC303
Oct 20202020-10-01 00:00:00 UTC2020-11-01 00:00:00 UTC000
Nov 20202020-11-01 00:00:00 UTC2020-12-01 00:00:00 UTC000
Dec 20202020-12-01 00:00:00 UTC2021-01-01 00:00:00 UTC000
Jan 20212021-01-01 00:00:00 UTC2021-02-01 00:00:00 UTC000
Feb 20212021-02-01 00:00:00 UTC2021-03-01 00:00:00 UTC101
Mar 20212021-03-01 00:00:00 UTC2021-04-01 00:00:00 UTC101
Apr 20212021-04-01 00:00:00 UTC2021-05-01 00:00:00 UTC101
May 20212021-05-01 00:00:00 UTC2021-06-01 00:00:00 UTC211
Jun 20212021-06-01 00:00:00 UTC2021-07-01 00:00:00 UTC000
Jul 20212021-07-01 00:00:00 UTC2021-08-01 00:00:00 UTC000
Aug 20212021-08-01 00:00:00 UTC2021-09-01 00:00:00 UTC000
Sep 20212021-09-01 00:00:00 UTC2021-10-01 00:00:00 UTC000
Oct 20212021-10-01 00:00:00 UTC2021-11-01 00:00:00 UTC000
Nov 20212021-11-01 00:00:00 UTC2021-12-01 00:00:00 UTC101
Dec 20212021-12-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
Jan 20222022-01-01 00:00:00 UTC2022-02-01 00:00:00 UTC101
Feb 20222022-02-01 00:00:00 UTC2022-03-01 00:00:00 UTC000
Mar 20222022-03-01 00:00:00 UTC2022-04-01 00:00:00 UTC101

What Hacker News says

21 sources
> Wuffs the Library is available as transpiled C code > However, unlike hand-written C, Wuffs the Language is safe with respect to buffer overflows, integer arithmetic overflows and null pointer dereferences. A key difference between Wuffs and other memory-safe languages is that all such checks are done at compile time, not at run time. If it compiles, it is safe, with respect to those three bug classes. Sounds a lot like ZZ. [0] It also sounds much like SPARK Ada, except for transpiling to C. [0] https://github.com/zetzit/zz
In Kaitai Struct: A new way to develop parsers for binary structures
You're right that you can't define a safe subset of C without making it impractical. MISRA C defines a C subset intended to help avoid C's footguns, but it still isn't actually a safe language. There are alternative approaches though: 1. Compile a safe language to C (whether a new language or an existing one) 2. Formal analysis of C, or of some practical subset of C, to prove the absence of undefined behaviour Work has been done on both approaches. ZZ compiles to C. [0] Dafny can compile to C++, but it seems that's not its primary target. [1][2] There are several projects on formal analysis of C. [3][4][5][6] [0] https://github.com/zetzit/zz [1] https://github.com/dafny-lang/dafny [2] https://dafny-lang.github.io/dafny/ [3] https://frama-c.com/ [4] https://www.microsoft.com/en-us/research/project/vcc-a-verif... [5] https://www.eschertech.
Read the rest
In ISO C became unusable for operating systems development
> we'll find out Rust isn't the panacea to all our language problems I don't think anyone is suggesting it will be. It's not about to supplant Ada SPARK, for instance, as Rust is far behind in terms of formal analysis. > just like what the parent pointed out about Java and it's memory safety promises back in the day Java does address the memory-safety issues of C and C++. You can't have a buffer overflow vulnerability in pure Java code. You can't have any kind of undefined behaviour due to memory-management mistakes in your code. You can't double-free, or use-after-free, or deference a pointer to a local variable that has gone out of scope. You can't trigger undefined behaviour through a read-before-write bug in your code. It's possible to have a memory leak in Java, if you retain references to objects for too long, but that won't ever gi
Read the rest
ve rise to undefined behaviour. Of course, there can still be bugs in a JVM, but that's another matter. All languages are vulnerable to compiler bugs. Other languages like JavaScript do the same. It's possible to leak memory, but it's never possible to trigger undefined behaviour from JavaScript. That's a vital part of its security model. > It is indeed quite possible to write memory safe C/C++ code... and it's done every day That doesn't sound right. There's a reason I gave the examples of the Linux kernel and Chromium. They're written by highly competent developers, but they still have subtle memory-management bugs. Most C/C++ codebases are written by less competent developers, but are of far less interest to attackers, so it's of less consequence. Their memory-management bugs are likely to go unnoticed forever. I agree it's possible to write C/C++ code without memory-management bugs (there are various formal development systems for C), but it's a significant challenge. I'd hope avionics software, for instance, would be entirely free of such bugs. > You never hear about how memory safe and performant all that code is... you only ever hear about the rare, high profile mistakes. They're not that rare, they're a major source of serious security vulnerabilities, and languages like Safe Rust can close the door on them entirely. > The problems with languages like C++ are more about how bloated it's become. There's 30 ways to do anything in that language, and 24 of them you're not supposed to use anymore! Agreed. C++ is quite a lumbering monster of complexity. Ada also has a reputation for being somewhat bloated, but it's not as far gone as C++. > if not for memory safety promises, then for it being a "fresh start" for systems programming without all the legacy baggage C++ has Keep an eye on Zig, too. Also D and Nim, and perhaps Vala. Also the lesser-known ZZ and Dafny languages, which look very interesting. https://github.com/aep/zz https://github.com/dafny-lang/dafny
In Inline and Sideline Approaches for Low-Cost Memory Safety in C
You're essentially describing a C compiler with advanced optimisations disabled, no? If you want improved safety and fewer footguns, the solution is to use a safer language than C, rather than to try to declaw a fundamentally unsafe language. Even MISRA C fails to guarantee the absence of undefined behaviour. (Other far more involved projects have made this a goal. [0][1]) The obvious candidates are Ada, Rust, and Zig. It doesn't make sense to mandate the absence of serious compiler optimisations, especially for a language like C. [0] https://github.com/zetzit/zz [1] https://github.com/microsoft/Armada
In How expensive is integer-overflow trapping in C++?
> Sure it is, that was the official way to differentiate code across Windows form factors for WinRT during Windows 8.x days. Thanks, I didn't know that. It doesn't really impact my point though, it just means the .Net IR is less portable than I thought. The point here is to have one portable IR for C code, after all, like Java bytecode. (Well, disregarding the other Java platforms such as Java ME, that is.) > So how come Apple and NVidia are able to massage LLVM bitcode to serve their purposes? I don't know specifics here but presumably they have significant control over the hardware and aren't aiming for extreme portability. Are they intending to support 32-bit, 64-bit, various endiannesses, exotic platforms that don't use 2's complement and don't represent NULL as bitwise zero, etc? All from the same IR? Java supports all such platforms
Read the rest
by forcing them to behave the Java way. Java's long is defined to be 64-bit and use 2's complement representation, regardless of the workings of the underlying hardware. C supports full-speed execution on all such platforms as it permits its behaviour to vary depending on the target platform. This is part of why the C spec is so loose about how the compiler/platform may behave. What are the values of MAX_INT and MAX_LONG? The spec doesn't dictate their values, although it does give lower bounds. You can't have it all, especially with C where even allocating an array of long requires using sizeof(long). You could mandate in your IR that long is 64-bit, but this means you've changed the behaviour of the C program when running on an LLP64 [0] platform, which must now emulate the 64-bit behaviour. There's similar trouble with pointers. If you mandate that pointers are 64-bit, you'll damage performance on 32-bit machines, unless the (native-code) compiler is somehow smart enough to optimise it back down to the native 32-bits. And this is assuming no preprocessor trouble, which might be acceptable in a controlled environment but isn't acceptable in a universal C bytecode that can do everything C source-code can. Again I'm not saying you can't define an IR for C for certain purposes, my issue is with a universal IR. It's not the same as defining an IR for a family of related products, as we see with GPUs and mainframes. Could you define such a limited-portability IR for your new OS that runs on x86-64, RISC-V, and AArch64? Probably. Would it really help? I doubt it. You can already write portable C programs if you know what you're doing and do adequate testing. If you want a language that gives you robust assurances of platform-independence, you shouldn't be using C in the first place. (From our previous discussions I believe we're both of the opinion it's a bit of a pity Ada sees so little general use these days.) It would presumably be possible to define a coding-standard a bit like MISRA C that prohibited anything platform-specific, for instance by banning general use of int and long and insisting on using the fixed-width types. It would also have the difficult job of prohibiting undefined behaviour. There's the ZZ project which does something vaguely along these lines, but it defines a whole new language that compiles to C. [1] > Deciding that they don't want to keep backwards compatibility is definitely politics. At the risk of a boring discussion on semantics, that doesn't sound to me like politics. Declining to be saddled with a commitment to backward compatibility, is a technical decision intended to permit future improvements. LLVM chose a permissive licence to keep Apple happy, in contrast to GCC. That counts as politics. [0] https://en.wikipedia.org/wiki/64-bit_computing#64-bit_data_m... (I figure you know this already, pjmlp, but it might be useful for someone else) [1] https://github.com/aep/zz , see also https://news.ycombinator.com/item?id=22245409
In Nvidia's Arm deal sparks quick backlash in chip industry
My point was only that C programmers should be keenly aware of the pitfalls of undefined behaviour, rather than blithely ignoring it. I've been surprised by the sloppiness of some developers on this point. > a subset of C without undefined behavior There are various projects out there that let you produce C code guaranteed to be free of undefined behaviour, but they're not 'quick fix' solutions, so they're not widely used. https://www.eschertech.com/products/ https://github.com/zetzit/zz https://blog.regehr.org/archives/1069 (ctrl-f for actually)
In Tips for stable and portable software
Thanks, I hadn't heard of that project. Their paper is at [0] (which I've only skimmed terribly quickly). I'm not quite sure what to make of 'targets a C-like language'. Does that mean, put bluntly, that it's not practical? Can it be made to target standard C? While we're here, a shoutout to ZZ / ZetZ, [1] which we discussed 5 months ago at [2]. It's a verifiable C-style language which compiles down to standard C. I'm not sure how mature the language is at this point. (It still pains me that my prominent comment at [2] turned out to be fundamentally mistaken.) And let's finish up the tour with a quick mention of Frama-C [3] and the (sadly proprietary) Escher C Verifier, [4] both of which work with C directly. [0] https://jamesrwilcox.com/armada.pdf [1] https://github.com/zetzit/zz [2] https://news.ycombinator.com/item?id=22245409 [3] http
Read the rest
In Dafny: Verification-Aware Programming Language
> What I wonder is how this formal verification works Curiously it involves Haskell for its specification. [0] They've also done some very impressive work verifying that the ARM machine code corresponds to the verified C code. They did this not by using a formally verified compiler, but by using GCC and then verifying the correspondence afterwards. > Is it possible to have a programming language where the compiler does the formal verification? Yes, but these languages are not all that approachable. There's SPARK, which is Ada-based and has seen real-world use in various life-or-death applications like military aviation. There's also ZZ, which is in early days, and which aims to be closer to C. [2] [3] There's also Perfect Developer, a proprietary payware product, which does impressive things adding formal verification machinery to C and C
Read the rest
In The SeL4 Foundation: What and Why
Encouraging C use is at this point, bordering on malpractice. I understand that the author is a leading authority in "secure C coding". While the ABI doesn't have a lot of affordances, we don't have to keep using the language because of the ABI. Rather ZetZ -- Symbolic Verifier and Transpiler to C. https://github.com/aep/zz and previous discussions, https://news.ycombinator.com/item?id=22245409 Zig, https://ziglang.org/ https://hn.algolia.com/?q=ziglang Rust is more of a C++ competitor, https://www.rust-lang.org/ And Dlang has a regime where it can be used w/o a GC. https://dlang.org/spec/garbage.html I left out any language which forces the use of a garbage collector.
In Effective C: An Introduction to Professional C Programming

Showing the 15 most recent of 21 sources. Enable JavaScript to search and browse every indexed mention.

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.