If you only wish to compile / run, skip to Compilation / Running Instructions
Welcome to the Rust Scheduler app. This will serve as a very quick guide on how to read this project best. This project is split into 3 main components; the clock
module, the gui
module, and the application
module. The clock
and application
modules are the 'backend', so to speak, and contain most of the logic for this program. The gui
module contains a lot of code written for GTK
, which is a foreign library, and is not commented as there is a lot of unavoidable boilerplate code.
The contents of each module:
clock
module:
- Date struct (for '2019-11-05')
- Day enum (for 'Thursday')
- Time struct (for '09:30')
application
module:
- Application struct (contains a list of courses and holidays)
- Course struct (contains Date and Task)
- Task struct (contains Date)
gui
module:
- Menu functions
- Window functions
- Util functions
For more information on how these structures work together, see the comments in their respective files. The 'TESTS' sections in the files only contain tests and no logic. However, they may help you understand how a certain function is meant to work. If you wish to check the gui
module, start at gui/mod.rs
.
This project is versioned with git! You can check the git history using git log
. Unfortunately, I initialized git a bit late into the process, so most of the application and clock modules' history is not available.
The only dependencies you need to have installed on your system is GTK+3 and Rust itself. Keep in mind Rust will download additional dependencies when you compile, but those are only local (if you run cargo clean
, it will delete all cached files). Here are some ways you can install it on your system:
MacOS:
- Install Homebrew, a package manager for Mac.
- Run:
brew install gtk+3
withsudo
if necessary.
Linux:
- Install through your system's package manager.
Windows:
- Follow the instructions here GTK+3.
You can now run the appropriate executable in the Product folder. scheduler_mac
for MacOS, scheduler_linux
for GNU/Linux systems, and scheduler.exe
for Windows. Read on if you wish to compile the project yourself.
Install Rust using your system's package manager (Homebrew, apt, pacman, etc.) or through their website.
When you have downloaded the necessary dependencies, now:
- In the directory with
Cargo.toml
, runcargo build
.- This will build the project.
- Now, you can run the project with
cargo run
. - Alternatively, run the executable at
target/debug/scheduler
.
You may now run cargo doc --no-deps --document-private-items --open
to open the documentation for this project.
.git
directory: generated by gittarget
directory: generated by CargoCargo.lock
: a lock file generated by Cargoscheduler.bin
: an example data file for the application- Feel free to remove it to test the application from scratch.
.gitignore
: used for git