My programming journey began with Python and JavaScript. Later, drawn to the ML (Meta Language) flavor, I experimented with F# for a while, but eventually abandoned it due to its lacking and fragmented ecosystem. I ultimately chose Rust to learn and use in-depth—a language with ML heritage plus some additional advantages (like performance, safety, and low-level capabilities—yes, these are just bonuses for me). I've been using Rust for over four years now. Throughout my journey of learning and using Rust, the language's emphasis on performance tradeoffs and the accessibility of standard library and crates—which allow direct inspection of underlying implementations—have equipped me with quite a bit of knowledge in low-level and system programming. Now, I need to learn C in preparation for an exam. Thanks to my Rust background, I've already grasped most common C learning challenges related to low-level and system programming (like pointers). Now I'm simply unfamiliar with syntax, flavors, and standard library of C.
Given this situation, is there a C guide tailored for Rust users like me? I've only found Rust guides for C users, which makes sense. However, I believe that my scenario will become increasingly common, especially as the Rust community continues to grow.
I have to use python for work, but got interested about rust because of the incredible developer tools that were made using it and have been learning about it for 2-3 years now. But I have a general interest in C too and curious about whether there are resources related to this. Especially because of the recent work in Linux kernel. Just leaving a comment here to make this more visible to more experienced people :'D
C is really a simple language. All the knowledge you need about the language is in this book:
The C programming language by K&R
C does provide some “std” libraries, but they are extremely simple (some are also discussed in the book), and not nearly as comprehensive as Rust’s std library.
And to answer your question: I am not aware of any resource like “C for Rust programmers” (maybe no one has bothered to create one due to C’s simplicity).
Hardly. Not so many people move to C from Rust.
I recommend "C in a Nutshell," an O'Reilly book (the one with a cow)
The K&R book is a classic that most C programmers are familiar with. The second edition of it is from 1988 so it doesn't cover the newer versions of the language.
Clang and gcc have support for most of C23 now. Jens Gustedt's "Modern C" is a good read for the latest practices.