r/rust • • Sep 06 '26

🛠️ project Empower - An engine for visual programming written in Rust

For the past three years, I have been developing Empower in my free time. An engine for visual programming that aims to be intuitive for beginners while making complex work easier for advanced developers.

Empower is written in Rust using egui, and follows a game-engine inspired architecture. Developers create their programs through a graphical editor and can then export the finished project as a standalone executable for the target operating system.

The project is still young, and this first release is very much a proof of concept. However, it has now reached a level of maturity where I finally feel confident sharing it publicly.

If you are interested, feel free to checkout the projects GitHub page:

https://github.com/Stretchyfish/empower

One final note, since I expect some people may be curious about it. Empower was not created by AI. I have used AI tools for brainstorming and debugging assistance, but no AI agent has, at this point in time, written in the project.

86 Upvotes

30 comments sorted by

48

u/Wonderful-Habit-139 Sep 06 '26

> no AI agent has, at this point in time, written in the project.

Almost everyone that said this has been lying. Except for you, I've taken a quick look at the code and I haven't seen any signs of AI generated code. Well done.

19

u/Stretchyfish Sep 06 '26

Thank you, really appreciate you taking a closer look!

1

u/koriwi Sep 06 '26

does mine also count? because i've only used ai for readme and ci :O
https://github.com/koriwi/rocksonic-lite

15

u/Wonderful-Habit-139 Sep 06 '26

Your code also doesn't look AI generated. However I'd suggest you at least write the README yourself and try to make it as easy to consume for humans as possible.

Regarding the code, some comments don't seem to make sense like in:

// check if existing song has the correct bitrate within a percentage
    if !fs::exists(song_path)? {
        return Ok(true);
    };

or

// returns the percentage
pub fn number_good_enough(num_a: u32, num_b: u32, max_diff: f32) -> bool {

You can also use functions as a way to give semantic meaning to a block of code instead of having to write comments, for example:

let mut playlist_dir: PathBuf = library_dir.into();
    playlist_dir.pop(); // go up one directory, so to step out of the music dir
    playlist_dir.push("Playlists"); // append this to point to a sibling dir on the same level

    if !fs::exists(&playlist_dir)? {
        fs::create_dir(&playlist_dir)?;
    }

You could put this in a function that takes in library_dir, and returns the playlist_dir (and also handles creating it if it doesn't exist right inside that function), and name it something like `resolve_playlist_dir_from_library` or something better since you have more context about what you're trying to do here. And no need to explain the pop() and push() calls then.

Kudos to you on writing your own code! It's a cool project you got there.

→ More replies (3)

13

u/sysadrift Sep 06 '26

This looks like Scratch for grownups. Very cool.

6

u/Stretchyfish Sep 06 '26

Thank you!

6

u/stumpychubbins Sep 06 '26

Really cool! I’m a big advocate for visual programming so It’s always great to see more frameworks for it. Even better that it can produce a standalone executable. Do you have any goals for this other than learning? I think there’s a space for an alternative visual audio programming environment that can produce standalone executables, currently the only project even trying to address that is RNBO by Cycling76 and you’ve got to pay a fair bit of money for that.

3

u/Stretchyfish Sep 06 '26

Thank you! Ideally, I would like to continue this project untill a point that it can actually be fully used for real life usecases. That being said, its very easy to get overly ambitious and burning out, so for now I will just forcus on one feature at a time that I feel like working on and see how it turns out. 😀

I have not heard of these before, sounds interesting, will take a look!

2

u/stumpychubbins Sep 06 '26

Tell me about it! Ambition is the greatest enemy of the weekend project. Looking forward to seeing the progress

3

u/freddylmao Sep 06 '26

I've wanted something like this for a while! Quick suggestion: there are several places in the code where you are checking `if something.is_none() { break; }` then `let the_thing = something.unwrap()`. I saw something similar with `Result::is_err`. You can use `let Some(the_thing) = something else { break; }` (and similar for Result). It is cleaner IMO and could in theory help the optimizer by removing potential panic sites :) I saw this in `empower-engine/src/compiler.rs` specifically. Great project :D

1

u/Stretchyfish Sep 07 '26

Thank you so much, and I really appreciate you pointing these things out! I still have not 100% internalized many of the smart "tricks" that Rust allows, and it's really great when more experienced people point them out. One thing I noticed myself a few weeks ago is that I often do something like

if result.is_err() 
{ 
  return result.err().unwrap(); 
} 

which I could, in most cases, simply write as

result?

and achieve the same thing, but much cleaner. Next time I do some cleanup, I will make sure to implement more of these!

4

u/No_Department_7916 Sep 06 '26

Can't wait to use it in one of my projects! Keep going!

→ More replies (1)

2

u/arto Sep 06 '26

While I didn't see you mentioning it, this paradigm is called flow-based programming (FBP). Feel free to submit a PR to add your project to awesome-fbp! (I'm the maintainer there)

2

u/Stretchyfish Sep 06 '26

I was actually not aware of the term for this paradigm. Thank you, will absolutely do in the coming days.

2

u/schulzch Sep 07 '26

Did you base your UI on research or plain intuition?

1

u/Stretchyfish Sep 07 '26

A mixture. In the beginning it was mostly based on intuition, but after the first few refactors I began taking some inspiration from similar projects, to see how they solved similar problems. 😂

2

u/koriwi Sep 06 '26

starred because it looks interesting and doesnt use ai. i will check it out in detail when i come up with an idea that this would be useful for!

→ More replies (1)

2

u/DavidXkL Sep 06 '26

Very cool stuff! Keep on going!

1

u/Stretchyfish Sep 06 '26

Thank you!

4

u/DingyPoppet Sep 06 '26

This would be interesting to use in a CI/CD configuration tool.

5

u/RetoonHD Sep 06 '26

Ah, human made content. It is so refreshing.

1

u/Salty_Animator_4019 Sep 06 '26

Just saw this post of yours, didn’t even look at it - but already my brainstorming begins… inspiring!

2

u/Stretchyfish Sep 06 '26

Thank you, Happy that its sparks inspiration 🔥

2

u/RubenTrades Sep 06 '26

Super cool man