Frakt is a Rust-based project focused on the computation and visualization of fractals. This workspace includes several components, such as clients, servers, and shared libraries.
Our documentation is available here.
Ensure you have Rust and Cargo installed on your system.
To clone the repository, run the following command:
git clone https://jabibamman/frakt.git
cd frakt
To build all packages in development mode:
cargo build
To build all packages in release mode:
cargo build --release
To build a specific package in release mode:
cargo build -p <package_name> --release
To run a specific package, use -p
followed by the package name. For example, to run the client package:
cargo run -p client
To build and run only the client:
cargo build -p client
cargo run -p client
To build the server library (used by other components):
cargo build -p server
cargo run -p server
To build the shared library (used by other components):
cargo build -p shared
To build and the complex library (used by other components):
cargo build -p complex
To run the worker with CLI, use the following command:
You can read the CLI rustdoc documentation for more information on the CLI arguments.
cargo run -p client -- -h
To run the server with CLI, use the following command:
cargo run -p server -- -h
To use the verbose log level, use the following command:
cargo run -p client -- -v
cargo run -p server -- -v
To use the debug log level, use the following command:
cargo run -p client -- -d
cargo run -p server -- -d
To generate documentation for all packages without including dependencies (recommended):
cargo doc --no-deps --open
To generate documentation for all packages including dependencies:
cargo doc --open
Represents command line arguments the CLI application
Usage: client [OPTIONS]
Options:
--hostname <HOSTNAME> Optional: The hostname of the client. Default: "localhost" [default: localhost]
-P, --port <PORT> Optional: The port number to connect on. Default: 8787 [default: 8787]
-N, --name <WORKER_NAME> Optional: The name of the worker. Default: "worker" [default: worker]
-v, --verbose Optional: Add a flag to enable/disable logging. Default: false
-d, --debug Optional: Add a flag to enable/disable debug mode. Default: false
-o, --open Optional: Add a flag to enable/disable opening the browser. Default: false
-s, --save Optional: Add a flag to save the image to a file. Default: false
-h, --help Print help (see more with '--help')
Usage: server [OPTIONS]
Options:
--hostname <HOSTNAME> The hostname of the server. Default: "localhost" [default: localhost]
-P, --port <PORT> The port number the server listens on. Default: 8787 [default: 8787]
-v, --verbose Optional: Add a flag to enable/disable logging. Default: false
-d, --debug Optional: Add a flag to enable/disable debug mode. Default: false
--width <WIDTH> Optional: Add a flag to edit the width and height of the window. Default: 1200 [default: 1200]
--height <HEIGHT> Optional: Add a flag to edit the width and height of the window. Default: 1200 [default: 1200]
-h, --help Print help (see more with '--help')
Contributions are welcome. Please follow standard contribution guidelines for pull requests.