What's everyone working on this week (51/2025)?

New week, new Rust! What are you folks up to?

2 Likes

Much more work on converting the core of Paperback from C++ to Rust. The goal for version 0.7.0 is to have the C++ be a thin GUI layer that calls the Rust staticlib, and then in 0.8.0 to replace it all with wxDragon.

2 Likes

I am trying to implement a data structure called masstree. The original was written in C++ too. Already had to rethink the originals approach because it used templates. By dividing into a high performance variant for Copy types, and Arc based variant for complex types. I wonder how far I will be able to go :'D Porting C++ code with so much raw pointer use seems incredibly difficult. Any advice for some common patterns that you learned when porting C++ to rust that may be useful?

1 Like

I started a clean-room implementation of an Adobe brush file format (.abr) parser, with the aim of producing s little CLI application to convert brushes to Krita and Gimp format keeping all the interesting properties, meaning the whole brush, not just the brush tip.

Reverse engineering is fun. :slight_smile:

4 Likes

It is definitely much easier when your project contains both C++ and Rust, that way I just bridge them using the amazing cxx crate. One piece of advice though is to not try to port line-for-line. I initially tried to do this and it lead to a lot of pain. Definitely keep the core idea in your head, maybe even in a notes document so you don't go off course. But Rust and C++, despite Rust trying to be a better C++, are not the same, and in fact you'll probably end up writing your code much better writing it from scratch in Rust with the C++ as a reference.

1 Like

Next Monday I'll know what I'll have done this week, but last week I implemented Catmull–Rom and B-splines for retrofire, as well as extrusion and camera pathing along splines. A short demo video:

Big shoutout to Freya Holmér for her awesome video on splines and spline continuity!

3 Likes

Still trying to figure out a way to get a WebTransport server implementation compiled to WASM with a bring-your-own-UDP-socket design.

1 Like

I'm trying to optimize parts of zlib-rs (specifically inflation / decompression). This involves a lot of unsafe, so I probably won't upstream it for awhile.

I'm having a whole lot of "fun" seeing that (soundly) removing bounds checks somehow causes things to be optimized worse. (Seems like it then tends towards inlining everything into one ginormous function that the optimizer evidently can't handle as well).

I have no clue how to coax the optimizer to do what I want. (Nor do I know what I want, beyond "faster".)

I started a .gitignore manipulation program a few weeks ago that allows the use of templates. It's currently functional, and I just need to sort out the absolutely shocking error handling, and maybe make it more efficient. Here's the repo: gignore. Please bear in mind, it's very unfinished and this is not the state I will release it in!

1 Like

Still working on my from-scratch parser for .wasm modules. Since it's my second project, I also asked for advice here.