corrode
C to Rust translator (by jameysharp)
interface99
Full-featured interfaces for C99 (by Hirrolot)
corrode | interface99 | |
---|---|---|
3 | 15 | |
2,143 | 262 | |
- | - | |
0.0 | 1.9 | |
about 5 years ago | about 1 year ago | |
Haskell | C | |
GNU General Public License v3.0 only | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
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.
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.
corrode
Posts with mentions or reviews of corrode.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-02-01.
-
C2rust: Transpile C to Rust
Back in the day there was also Corrode: https://github.com/jameysharp/corrode
-
lipstick: a Rust-like syntax frontend for C
Some intersection with https://github.com/jameysharp/corrode in theory right? Maybe it's saner actually to start with corrode-to-lipstick (there has to be a good project name here) and then it's perhaps easier to turn lipstick into safe Rust?
- Modern C and What We Can Learn from It [video]
interface99
Posts with mentions or reviews of interface99.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2022-05-23.
- Full-featured OOP interfaces for C99
-
Templates in C
There is a project that achieves something like this, and quite nicely I think, worth checking it https://github.com/Hirrolot/interface99
-
Pretty-Printable Enumerations in Pure C
I agree; I would especially not recommend abusing macros throughout an application codebase too much. Conceptually, Metalang99 is more of a (sub)language than a library, which also adds some entry barrier. Ideally, I see the application of Metalang99 being used "behind the scenes", e.g., encapsulated in separate code files/libraries such as Datatype99 and Interface99. This is what I (mostly) do in SmolRTSP.
- Just Lua things
-
Comparing Golang and Interface99
There are also some differences. Golang, for example, can resolve interface methods at run-time, whereas Interface99 constructs virtual tables statically. Interface99 allows default implementations; Golang doesn't. And, of course, Interface99 mandates placing impl(MyIface, MyType), whereas Golang uses a.k.a. duck typing for interfaces (interface implementations are indistinguishable from ordinary methods). Also, when you would use embedding in Golang, such as this:
I think your github repo link is broken. Here's a working link.
-
lipstick: a Rust-like syntax frontend for C
I've done something similar with Datatype99 and Interface99. They are like a macro eDSL that compiles to C. The first one features algebraic data types, the second one features interfaces.
-
Any alternative to vala?
If you need a bit more high-level constructions, you can use the Datatype99 and Interface99 libraries. The former provides polymorphism over data, the latter -- over behaviour (I am the creator of these libraries).
-
Diamonds in the Rough : An Honest Trial for any Language
Is it possible that you could benefit from "a better C"? If so, I'd love to hear your take on Crystal, and the recent announce on Interface99.
-
Comparing interfaces: Rust and Interface99
There is a full example code: https://github.com/Hirrolot/interface99/blob/master/examples/state.c.
What are some alternatives?
When comparing corrode and interface99 you can also consider the following projects:
datatype99 - Algebraic data types for C99
COS - C Object System: a framework that brings C to the level of other high level programming languages and beyond