Yet another push_swap visualizer written in Rust. psv stands for push_swap visualizer.
push_swap is a 42 project where the objective is to create a program that takes a sequence of numbers as input and outputs a series of instructions to sort those numbers by using two stacks and a minimalistic set of operations.
This program helps visualise the output of the push_swap program.
See USAGE.md
- A nice and organised GUI
- Number sequence generation
- Random sequence, normalized or from a custom range
- User input
- Ordered numbers (why would you need this)
- Reverse Order (a little more useful than the previous option)
- Visualise based on program output or user input
- Customisable playback speed (speed going from 1 instruction per second to all instructions in 2 seconds)
- Benchmarking (command-line only, run
./psv benchmark, aliases:bench,b) - Clear color customisation
- Sorting number color customisation
- Gradient color customisation
- Group color customisation
- A few number arrangement presets you can test your push_swap on for fun!
Warning
wgpu has a fairly high MSRV requirement, so make sure your Rust toolchain is up-to-date!
Pre-requisites:
- An up-to-date Rust toolchain, preferrably installed using rustup
- A fairly recent GPU (for running)
Steps:
- Clone this repo
- Run
cargo build --releaseorcargo run --releaseif you want to run the program - ???
- Profit
Note
Despite the usage of WASM-ready crates, I have no plans to make and deploy a WebAssembly version of this program.
This project is licensed under the MIT License.
