Notifications
Clear all

Rewrite it in Rust?  

  RSS
CK-7vn
(@ck-7vn)
Active Member
Rewrite it in Rust?

Hey everyone! I know this isn't a programming forum, but, I am by trade a software engineer, and even more than software, I love 3D printing, I also love FOSS. So..

Naturally of course I have been researching and looking through github and online for Rust related slicers or firmware related to 3D printing and quite literally everything seems to be written in C++. Does anyone know of any projects that are in Rust, or Go? (I understand why Go wouldn't be nearly as good of a choice, but that being said, I'm also not incredibly great with Rust, I've only been writing in it for about a year on projects and hobby stuff but I do love the language and am trying to get better with it, my job is primarily Go and Typescript :'( ).

Just figured I'd ask on here. It seems as though there was a couple crate projects that were started for 3MF file types and things, and someone seemed to have started writing a slicer, maybe? But by the looks of it they didn't come close to finishing it and it hasn't been worked on for months and months. 

So, I just figured I'd post on here and see if anyone knows of anything or is even interested in the idea of a Rust slicer, or Rust firmware? 

Posted : 19/03/2026 2:50 pm
1 people liked
hyiger
(@hyiger)
Famed Member
RE:

Every is written in C++ for a reason. It's been around for 40 years and for many of those years the most performant language given that it's natively compiled and has a rich ecosystem of libraries.

As far as creating a new slicer from the ground up? It's not an easy task. If you look at all the slicers commonly in use, they descend from only 2 parents: Slic3r and Cura. For example, OrcaSlicer is a fork of BambuStudio which is a fork of PrusaSlicer which is a fork of Slic3r. A lot of that code has evolved over 15 years and it is quite complex. 

I'm sure if you hunt around on github you'll find slicer projects. I doubt any of them are mature enough to use on a regular basis. Here is one example written in Rust: GladiusSlicer however the last updates were several years ago. 

 

Posted : 20/03/2026 12:30 am
1 people liked
andhson
(@andhson)
Estimable Member
RE:

What you are describing is essentially the problem of accumulating a critical mass of developers supporting the idea. From my experience having been in the software industry 30+ years and a significant number of those working on implementing compilers and languages there are very narrow criteria’s for when the choice of language is critical to the product unless the choice is outright unsuitable. It is much more critical that the developer community building the product is skilled in the environment of choice. What you observe is that these existing products where started in an era when c++ was the language of choice for these implementations, and the benefit of switching to some other language does not outweigh the cost of doing so for the community that develops it.
Starting a re-implementation of existing features in a new project where only another implementation language is the differentiator feature is going to be a hobby project for a long time, you need something new the old products don’t have to make a shift and gather critical mass in a community of developers that want that new thing. That said, for learning stuff it can for sure be a great project that over time may come up with that new thing.

/Anders

Posted : 20/03/2026 8:37 am
3 people liked
Jürgen
(@jurgen-7)
Famed Member
RE: Rewrite it in Rust?

You would need critical mass regarding interested developers. Which may be difficult to achieve since the intersecting set between "developers keen on 3D printing" and "developers keen on Rust" will be of limited size. And there is already a lot of "critical mass" in the existing C++ code base, making a rewrite a major project.

Posted : 20/03/2026 8:41 am
1 people liked
mnentwig
(@mnentwig)
Honorable Member
RE: Rewrite it in Rust?

question is, would I want that. Looking at Klipper which awfully looks like Python with a sprinkle (OK, a topping) of embedded C.

Wondering whether Rust is the best choice for agility towards unknown future requirements. If the situation is "you can have more development resources, use them in a meaningful way" I'll buy it. For the usual "it needs to be ready yesterday", not convinced.

Posted : 20/03/2026 10:46 am
CK-7vn
(@ck-7vn)
Active Member
Topic starter answered:
RE: Rewrite it in Rust?

Yes, I definitely agree with pretty much everything everyone's saying, and I totally get, both a huge undertaking, and not really a super big reason to change the language at the moment quite literally other than just to say you were doing it. 

I was mostly just curious. I'm not super new to rust, I've been writing it for a little over a year now outside of work and I don't do the whole "this language, that language" deal, just like @andhson that is definitely the truth. The language is just a tool, essentially are you a dewalt, milwaukee, or makita guy? It's still the operator behind it at the end of the day that is the differentiating factor in the quality of what comes out of it. 

Quite honestly, I guess I never even really thought about the fact that it's definitely true that Rust wasn't even a thing i'd imagine when these base projects started (slic3r) etc. That alone answers a bunch of trivial questions I had rattling around in my head. 

I was thinking about just dabbling in trying to write one, just for fun. I know it would be more  than likely a multi-year project, but, that's not the point. The point would be to get better at Rust and learn more about what's going on when I spend time slicing. I'm absolutely in love with 3D printing, i've only been doing it for about a year now but it's arguably overtaken the passion I have for software engineering, which I didn't think would ever happen. And, currently I write React/Typescript mostly all day, and it's eating away at my soul...:'( so...maybe a project like that could help save my sanity. 

Posted : 20/03/2026 2:57 pm
1 people liked
andhson
(@andhson)
Estimable Member
RE: Rewrite it in Rust?

One thing I did forget to mention, these new AI agents may soon move the needle on such rewrite projects, especially open source ones where there is something for that agent to start with often including test cases. The way this changes things is that resources in a community is no longer only enthusiasts spending their time if one has the resources to use machines to cover the gap. For what it is worth, this does not really increase the value of the effort but it may reduce the cost.

/Anders

Posted : 20/03/2026 5:40 pm
2 people liked
mnentwig
(@mnentwig)
Honorable Member
RE: Rewrite it in Rust?

Very good point, unfortunately. The classic example for overcoming copyright is Ami-/Phoenix BIOS - abstract existing code into a complete spec, re-implement from there and keep the paperwork to prove authorship. AI will be good at this game.

Posted : 20/03/2026 7:35 pm
Sembazuru
(@sembazuru)
Noble Member
RE: Rewrite it in Rust?

FYI, Slic3r wasn't originally fully C++. Parts of it (mostly the GUI) was written in Perl. According to some quick google research, the development team was slowly converting to all C++, but the github repository doesn't seem to have seen any activity in at least 4 years, and the most recent release was in 2018. One of the things that Prusa did was to fully rewrite the Perl bits into C++. I honestly don't recall when the C++ rewrite was completed vs. the rebrand from Slic3r-PE (Prusa Edition) to PrusaSlicer.

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Posted : 20/03/2026 7:52 pm
1 people liked
hyiger
(@hyiger)
Famed Member
RE: Rewrite it in Rust?

With PrusaSlicer and OrcaSlicer it's the GUI and it's associated workflow that I find the most annoying. Fortunately all the hard bits (the actual slicing) is within libslic3r. A worthwhile project could be to design a new GUI from the ground-up but still call out to libslic3r to do all the heavy-lifting. It's the kind of project I might take on depending on what PrusaSlicer 3.0 fixes (or not). 

Recently I've been working on a bunch of filament calibration tools (well my AI assistant/slave has...) anyway I'm thinking of translating the Python into C++, forking off my own version of PrusaSlicer and embedding them. At the same time maybe improve the workflow. Currently filament management in PrusaSlicer is terrible. It's very kludgy and error-prone. 

Posted : 21/03/2026 3:58 pm
1 people liked
Public username (required)
(@public-username-required)
Trusted Member
RE: Rewrite it in Rust?

 

Posted by: @ck-7vn

Rewrite it in Rust? 

Why?

1) What is the problem with the current C++ verison?

2) There is no shortage of C++ developers, and no-one is getting hacked from memory leaks in their Slicer (that I know of)

3) How many rust devs are familiar with the problem domain (3d printing, printer hardware, and their algorithms)?

If you want a Rust slicer, I would just make a new slicer. 

Posted : 22/03/2026 2:08 pm
CK-7vn
(@ck-7vn)
Active Member
Topic starter answered:
RE: Rewrite it in Rust?

That's super cool to know! Perl, dang...what a time to be alive back then I'd imagine. Jeesh. 

Posted : 23/03/2026 5:16 pm
CK-7vn
(@ck-7vn)
Active Member
Topic starter answered:
RE: Rewrite it in Rust?

I agree! I originally started working with slicers while I was incarcerated...(Don't judge me, I was incredibly stupid when I was younger, if that statement makes you go "hm?..." heres a blog post on it -> ck-7vn.dev/blog/Home) and we had A1's so naturally I used Bambu studio, and I definitely didn't think it was a bad slicer but when I got home I switched to Prusa Slicer because while I was in my wife bought me a MK4s and a Core One + for our anniversary and I will definitely admit. Prusa Slicer's GUI is most days frustrating, and very buggy. 

For instance; I hate that I can't just "add a plate",  I hate how we top out at 9 plates per project, dealing with multiple filaments is a super pain, and just a few more small things that are super annoying. 

That being said, I love Prusa, I love what Prusa stands for, and I love my Prusa's. 

@public-username-required definitely nothing wrong with the C++ version, and I'm not inherently saying there is. It just surprised me that there is almost quite literally nothing in the space as it pertains to Rust. Rust being a systems language and a language more than capable of doing everything that the 3D printing and Slicing community would need it surprises me that there's not more involvement in the space with the Rust community and I just wanted to get peoples opinions and thoughts on it! Which has been great. I've learned quite a bit just in this short thread, I love it! 

@hyiger super cool filament calibration tools! I just starred the repo and plan on following it, maybe contributing sometime as well if that's cool with you! 

Posted : 23/03/2026 5:27 pm
Share: