Our great sponsors
doom | c2rust | |
---|---|---|
5 | 45 | |
449 | 3,320 | |
0.9% | 3.1% | |
6.3 | 9.5 | |
16 days ago | 8 days ago | |
C | Rust | |
GNU General Public License v3.0 only | GNU General Public License v3.0 or later |
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.
doom
- C2Rust Transpiler
-
How Does V Compare To Zig
I believe that you're talking about doom repository. If that's the case, how'd I believe that it was indeed done using C2V when it's non-existent (checked the repo, it's still empty). A simple AST parsing python script with some heuristics can achieve one time conversion, that doesn't mean that it would work for all C programs.
c2rust
-
Emitting Safer Rust with C2Rust
> The date at the bottom of the article is 2022-06-13. Has there been further progress?
The article links to their github repo:
https://github.com/immunant/c2rust
There's commits in the last hour, so at least some signal of life.
-
Writing an OS in Rust to run on RISC-V
This is arguably already the state of things.
Rust might get compiled down through MIR, down through LLVM IR, down to assembly or wasm... which then might be JIT or AOT (re)compiled into other bytecodes... which might perhaps be decompiled back up to C... and C might be retranslated back to horrific unsafe-spamming Rust by the likes of https://c2rust.com/. We've come full circle!
The main issue is that retranslating high level languages into other high level languages isn't something that there's actually a lot of demand for, especially commercially, especially given the N x M translation matrix going on. So a lot of the projects "stabilize" (get abandoned). And automatically translating between the idioms of those languages gets even nastier in terms of matrix bloat.
Well, you've got stuff like MSIL and JVM bytecodes which are higher level, and preserve more type information, and can be compiled to / decompiled from while still preserving more structure, but they still form competing incompatible ecosystems.
-
Will Carbon Replace C++?
That's the wrong direction. What's needed are intelligent converters which convert less-strict languages to more-strict ones.
Non-intelligent converters just make a mess. Here's c2rust.[1]
Classic C++ to modern C++, plus a compiler flag to lock out all the old unsafe stuff, would be an achievement.
- What would you rewrite in Rust?
-
Red Black Tree in Rust
Well, technically, it's not hard to build such data structures. If you are willing to liberally use raw pointers, UnsafeCell, MaybeUninit and ManuallyDrop, then you can more-or-less write C-equivalent code in unsafe Rust. (there are even transpilers from C to Rust)
-
C2Rust Transpiler
In the chart at [1], this step is represented by a magic wand.
(I wanted to give some examples, but https://c2rust.com/ seems to not be translating today.)
-
Pitchfork: Rack HTTP server for shared-nothing architecture
There are some tools specific to some transformations at least:
-
โRust is safeโ is not some kind of absolute guarantee of code safety
I expect that is because you're not particularly familiar with either LLVM or Rust, considering C can literally be transpiled to Rust.
-
Bash 5.2
c2rust https://github.com/immunant/c2rust :
> C/C++ to Rust transpiler
crust https://github.com/NishanthSpShetty/crust :
> C/C++ to Rust transpiler
"CRustS: A Transpiler from Unsafe C to Safer Rust" (2022) https://scholar.google.com/scholar?q=related:WIDYx_PvgNoJ:sc...
rust-bindgen https://github.com/rust-lang/rust-bindgen/ :
Automatically generates Rust FFI bindings to C (and some C++) libraries
nushell/nushell looks like it has cool features and is written in rust.
awesome-rust > Applications > System Tools
What are some alternatives?
subsurface - This is the official upstream of the Subsurface divelog program
min-sized-rust - ๐ฆ How to minimize Rust binary size ๐ฆ
librope - UTF-8 rope library for C
json-c - https://github.com/json-c/json-c is the official code repository for json-c. See the wiki for release tarballs for download. API docs at http://json-c.github.io/json-c/
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.
zz - ๐บ๐ ZetZ a zymbolic verifier and tranzpiler to bare metal C [Moved to: https://github.com/zetzit/zz]
genny - Generate a shared library and bindings for many languages.
rtorrent - rTorrent BitTorrent client
langs
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
corrode - C to Rust translator
mu - Soul of a tiny new machine. More thorough tests โ More comprehensible and rewrite-friendly software โ More resilient society.