dstep
jotai-benchmarks
dstep | jotai-benchmarks | |
---|---|---|
4 | 2 | |
202 | 31 | |
- | - | |
6.5 | 6.1 | |
16 days ago | 5 months ago | |
C | C | |
- | GNU General Public License v3.0 only |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dstep
-
I want to install a package globally
You might also be interested in dstep, a tool that can generate D bindings from C header files.
-
Maintain It with Zig
- C, Objective-C = https://github.com/jacob-carlborg/dstep
> its test blocks make unit testing trivial to integrate.
Again, D also has this:
https://tour.dlang.org/tour/en/gems/unittesting
void main() {
-
Raylib, a simple and easy-to-use library to enjoy videogames programming
It's a C lib, generating bindings is super easy https://github.com/jacob-carlborg/dstep
There is no need to maintain bindings that can be automatically generated, wich can easily get outdated if the C project is actively developped
Anyways, someone went a ahead and updated it: https://github.com/Soaku/raylib-d
-
I rewrote my Rust keyboard firmware in Zig: consistency, mastery, and fun
Not quite as seamless as Zig, but dstep is an external program that leverages libclang to do the same thing (and generates a D module for you), as well as e.g., smartly convert #define macros to inlineable templates functions :)
https://github.com/jacob-carlborg/dstep
jotai-benchmarks
-
Tips Performance benchmarks for a custom compiler?
But let me suggest Jotai to you. That's a collection with about 30K C programs. They all run without undefined behavior (as per kcc or frama-C). Each program is self-contained. But each program also runs for a very short time. So, I recommend you use CFGGrind to count the number of instructions executed. CFGGrind can separate instructions per function, and each Jotai benchmark consists of a single function. For instance, to count the total number of instructions executed by function foo, you can do (assuming that profile data was saved into a file called `test.cfg`):
-
The Jotai Benchmark Collection
We, at UFMG, have been working on a methodology to generate benchmarks in C. We have a working collection of benchmarks here with a bit more than 30K executable programs. Benchmarks are single functions mined from open-source repositories. We have designed a domain-specific language to generate inputs for them. We use psyche-c to infer missing types and declarations. We use kcc and AddressSanitizier to filter out as much undefined behavior as possible. We use CFGGrind to check input coverage and to count the number of instructions executed. These benchmarks can be used in many ways: to stress test compilers; to autotune predictive compilation tasks; to analyze the dynamic behavior of programs; to improve compiler optimizations; etc. We have a technical report here.
What are some alternatives?
arocc - A C compiler written in Zig.
termux-ndk - android-ndk for termux
utfcpp - UTF-8 with C++ in a Portable Way
psychec - A compiler frontend for the C programming language
raylib - A simple and easy-to-use library to enjoy videogames programming
checkedc - Checked C is an extension to C that lets programmers write C code that is guaranteed by the compiler to be type-safe. The goal is to let people easily make their existing C code type-safe and eliminate entire classes of errors. Checked C does not address use-after-free errors. This repo has a wiki for Checked C, sample code, the specification, and test code.
RIIR - why not Rewrite It In Rust
llvmbox - Self contained, fully static llvm tools & libs
mach - zig game engine & graphics toolkit
CSpydr - A static typed low-level compiled programming language inspired by Rust and C
cc-rs - Rust library for build scripts to compile C/C++ code into a Rust library
CFGgrind - A dynamic control flow graph (CFG) reconstruction plugin for valgrind.