[fix] Spelling mistakes
[dev] Readme
[dev] Unit tests
Given two valid words and a dictionary, this application will calculate a word path if possible.
This should work on Mac, Linux (tested) and Windows.
To run this program, you are required to pass the following arguments.
wpath [file] [starting_word] [ending_word]
The file argument expects a file that is readable to the current user encoded in UTF8.
Most users will want to point this to /usr/share/dict/words
. If you are on windows, just point it to a similar file or download a copy from https://gist.githubusercontent.com/Warth2033/2a9c38ea200c3499da638c67faff5e9c/raw/d9783627c731268fb2935a731a618aa8e95cf465/words
This is the word that the program will start off on, this word is required to be alphabetic.
The length of this word must match the ending word.
This is the word that the program will attempt to find a path to. If no path is valid, the program will panic.
The length of this word must match the starting word.
You must install rust for your system, you can do so by reading https://www.rust-lang.org/
Either clone with your preferred git client or find a directory and run git clone https://git.sr.ht/~vam-jam/wpath
Once rust is installed, navigate to the folder you just cloned this repo in and run:
cargo build --release
This will compile the program with optimizations turned on. Once done, you can either do:
cargo run --release /usr/share/dict/words cat dog
Or you can find the executable file here:
root_folder/target/release/wpath
And run it with the same args:
wpath /usr/share/dict/words cat dog
Some tests will fail on windows due to hardcoded paths, as long as /usr/share/dict/words
exists, all tests should pass
cargo test