A Newbie's First Contribution to (Rust for) Linux
23 points by senekor
23 points by senekor
Thanks for the write up! It was interesting to understand the process end to end from a beginner.
Can you link to the original C version of the code and the Rust version that you translated it to? I didn’t see it anywhere in the post, and that would be helpful for understanding the work you did.
I added an update at the bottom of the post with some links. I’ll also post it here for convenience:
The original driver is split in a .c and a .h file. The Rust driver is here. In my opinion, the driver code itself is really not all that interesting. It’s surprisingly standard Rust code. That is of course thanks to the heavy lifting done by the safe API wrappers, which are way more interesting. I had to make small modifications here and there, so I won’t list them all. But the most interesting ones (including all the code snippets I discussed above) are part of a patch series that I posted on the LKML. A mostly finished version of it can be found here.
Nice write-up. Re the mailing list issue: a new platform, tangled.sh, might be a good fit. Their PR system is interesting, see the accompanying blog posts:
I’m following the development of tangled with interest. Sadly, I haven’t had the chance to actually try it yet. It looks like their stacking feature doesn’t allow treating multiple commits as a one unit of review, which is kind of a hard requirement for a worthy mailing list successor. If the interdiff feature is limited to review units containing a single commit, that’s not really a fundamental improvement over Gerrit or even using GitHub PRs without modifying history and then squashing everything to one commit at merge-time. It may be better integrated with Jujutsu (❤️) and thus more convenient to use locally, which is certainly welcome.
Is that something that’s useful to the Linux kernel maintainers or to contributors? Can the contributor use tangled if the kernel maintainers stick with the mailing list workflow (which seems like they will for the foreseeable future)?