Maxx — A little "RAD" experiment for Rust

Hi everyone,

A few months ago, I started looking into Rust as a hobby.

One of the things that made me curious about Rust in the first place was Zed. I really like the editor, and knowing that it was built with Rust and GPUI made me want to understand what was going on under the hood and, more importantly, try building something with its GUI toolkit myself.

So I started playing with Rust and GPUI without any particular goal.

And, as it often happens with side projects, I ended up thinking:

"What if I tried to build a little RAD tool for Rust?"

I had no idea whether it was a good idea or not.

So I built it anyway. :grinning_face_with_smiling_eyes:

This became maxx:
To be honest, I used my remaining Claude tokens to create it.

https://crates.io/crates/maxx

GitHub:

The basic idea is to experiment with a visual environment for building GPUI applications, while generating and working with actual Rust code.

It's very much a hobby project.

I built it primarily because I wanted to use something like this myself, and because it was a fun excuse to learn more Rust, GPUI and the surrounding ecosystem.

I'm not trying to build a new Rust framework or turn this into a product. There is no business plan behind it and no ambitious roadmap.

It's really just:

I discovered Rust through Zed → wanted to play with GPUI → had a weird idea → built it.

And now I'm curious about what other Rust developers think.

Maybe the idea is useful.

Maybe it's completely pointless.

Maybe I'm solving a problem nobody has.

Maybe I'm approaching it in a completely wrong way.

I'm genuinely open to hearing that.

I'm particularly interested in feedback from people who know Rust and GPUI better than I do. Suggestions, criticism, ideas, discussions — all welcome.

And if someone finds the project interesting enough to contribute, that's welcome too.

For now, I'm mainly doing this to learn, experiment and have fun with Rust.

Thanks for taking a look!

It's really interesting how Claude writes the code:

for (index, line) in comment.lines().enumerate() {
            // The first line takes the column, the rest keep the one they were
            // written in — the same rule `write_comments` follows, or a block
            // comment would drift right by one level on every save.
            if index == 0 {
                out.push_str(line.trim_start());
            } else {
                out.push_str(line);
            }
            out.push('\n');
        }

At every iteration it tries to figure out if it's the first one. I did it at my first day of programming, so Claude is a junior developer who likes documenting.

Thanks for the comment. You're right: the code is clear enough on its own—if that is indeed what you meant?
You seem to be suggesting that there is a better way to avoid systematic testing?

Eh, I'd say that code is fine. It could instead be:

let mut lines = comment.lines();
if let Some(line) = lines.next() {
  out.push_str(lines.trim_start());
  out.push('\n');
}
for line in lines {
  out.push_str(line);
  out.push('\n');
}

but that's more lines and more confusing.

Really the actually clever bit would be noticing that you probably could just trim_start() the whole comment and append the whole thing at once, since you're not adding any prefix.

Thanks for the suggestion! I'm not sure I understand the line.next() approach I'm not familiar with.
Have you tried maxx? What do you think of this idea to quickly initiate a project with Zed's GUI?

Haven't looked at it yet (I have work), but the idea is good!

Thanks, I wasn't confident to share it and I'm really open to comments, suggestions...

Now the 0.3.2 version is here with a lot of improvement.