Skip to content

Raoul1808/psv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

117 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

psv

GitHub Tag Download Latest

Yet another push_swap visualizer written in Rust. psv stands for push_swap visualizer.

Screenshot

Context

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.

How to use

See USAGE.md

Features

  • 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!

Building

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:

  1. Clone this repo
  2. Run cargo build --release or cargo run --release if you want to run the program
  3. ???
  4. Profit

Note

Despite the usage of WASM-ready crates, I have no plans to make and deploy a WebAssembly version of this program.

License

This project is licensed under the MIT License.

About

Yet another 42 push_swap visualizer, with a benchmarking utility

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors