Our great sponsors
-
zig
General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
There is a recent draft PR [1] to merge this into the zig compiler itself.
There is an urge to make LLVM a more optional component in zig than it has been in the past [2]. Using arocc to fill this gap would mean that seamless C compilation could still be done, without LLVM being involved.
There are likely other reasons I've missed. Any corrections/clarifications to the above welcome.
[1] https://github.com/ziglang/zig/pull/10795
For contrast, gforth (a prominent Forth interpreter, by Forth standards) generates+compiles+links binding code in C, at runtime, using the ordinary C toolchain. [0][1][2]
A bit 'out there' you may say, but on the plus side this approach enables handling header files and tidily expressing bindings without the need to implement their own C parser. [2]
[0] GitHub mirror: https://github.com/forthy42/gforth/blob/dda77d851ddeb80ca849...
[1] The official host: https://git.savannah.gnu.org/cgit/gforth.git/tree/libcc.fs
[2] https://rosettacode.org/wiki/Call_a_foreign-language_functio...