Skip to content

vanilla-extracts/various_projects

Repository files navigation

Various projects

projects done in Rust to learn the language.

TODO List

  • cat
  • ls
  • calc (done under its own project)

Building

To build the projects do

cargo build --release

or just

make release

Cat

Don't let the name fool you, it is not a full reimplementation of the POSIX cat, it just reads the content of a file

./target/release/cat <file> [--reversed]

Usage

cat

You can also reverse the cat output by adding a parameter after the file

cat

LS

LS: a very minimalistic bare bone implementation of ls

./target/release/ls <dir>

It just list files in a dir.

Usage

You can just do

./target/release/ls <dir>

which produces

However this one has options

Options

Colour

You can add colours to the output with the --color or -c option

Sort

You can sort alphabetically the output with the --sort or -s option

Both

And you can combine them to have a beautiful sorted output