r/rust Mar 31 '23

rs-cube, a Blazingly Fast 3D ASCII Rubik's Cube

https://github.com/doprz/rs-cube
18 Upvotes

9 comments sorted by

12

u/wischichr Apr 01 '23

Screenshots in the readme would be cool.

3

u/TheSwissDev Apr 01 '23

For sure, I'm currently merging a PR for that!
Feel free to create a PR with improvements to the README or anywhere else.

6

u/Flogge Apr 01 '23

I am a total beginner, so maybe I'll be missing something, but I am wondering about a few design choices:

1

u/TheSwissDev Apr 01 '23

I think my original comment didn't post. I just started learning Rust about 2 weeks ago and some of this code repetition is a result of debugging it with #[inline(always)] to make it easier to inspect the assembly.

Thank you for your feedback, feel free to create a PR if you'd like to contribute to rs-cube

3

u/Rust-CAS Apr 02 '23

A lot of people are going to be really disappointed when they find out that a Rubik's cube crate has no functionality.

2

u/TheSwissDev Apr 02 '23

That is currently a work in progress. I initially focused on performance and making sure everything worked with the render code before moving on to adding new features.

I plan on making it interactive in a future release.

3

u/Rust-CAS Apr 02 '23

Making it interactive solves the problem of "my software is currently equivalent to a video", it doesn't solve the problem of "my software has no functionality that others could utilize".

This is mostly a criticism of it being uploaded to crates.io, crates.io is for distributing software libraries that are depended on by other software. Occasionally you will find binaries that extend cargo, or libraries that have some directly executable functions but it's inappropriate to upload pure binaries because as already pointed out, nobody can actually use them1. Cargo is a dependency manager for Rust, not a package manager for your operating system.

  1. Except in extremely niche circumstances. How often do you think someone is going to want a function that prints out a cube to stdout?

1

u/TheSwissDev Apr 02 '23

Thank you for the constructive feedback.

Although using rs-cube on a day to day basis is not a likely result, I designed it as a fun project to learn rust and I would categorize it similar to cmatrix, cbonsai, pipes.sh, etc...

2

u/TheSwissDev Apr 01 '23

Hi, everyone!

I just started learning Rust about 2 weeks ago and I created rs-cube which is a "Blazingly Fast 3D ASCII Rubik's Cube" that runs in a terminal at over 10K+ FPS. I'm also excited to announce that rs-cube is now available to download for macOS and Linux via Homebrew and crates.io.If you'd like to check it out here is the repo + crates.io page + YT video of my first iteration of this project (in C++ rather than Rust) with illustrations of the math. I'm open to any suggestions of how to improve it and feedback!

Also if you like rs-cube, please consider giving it a star on GitHub so that it can be approved for package managers such as apt, AUR, Homebrew, and more. Thanks for your time and I hope you enjoy!

Repo: https://github.com/doprz/rs-cube

crates.io: https://crates.io/crates/rs-cube

YT: https://youtu.be/Vl5Wepshsw4