Skip to content

Frakt is a Rust-based project focused on the computation and visualization of fractals.

Notifications You must be signed in to change notification settings

jabibamman/frakt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Release wakatime codecov GitHub issues

Frakt - Fractal calculation

Description

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.

Installation

Prerequisites

Ensure you have Rust and Cargo installed on your system.

Cloning the Repository

To clone the repository, run the following command:

git clone https://jabibamman/frakt.git
cd frakt

Building and Running

Development Build

To build all packages in development mode:

cargo build

Release 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

Running Specific Packages

To run a specific package, use -p followed by the package name. For example, to run the client package:

cargo run -p client

Individual Packages

Client

To build and run only the client:

cargo build -p client
cargo run -p client

Server

To build the server library (used by other components):

cargo build -p server
cargo run -p server

Shared

To build the shared library (used by other components):

cargo build -p shared

Complex

To build and the complex library (used by other components):

cargo build -p complex

Running the worker with CLI

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

Running the server with CLI

To run the server with CLI, use the following command:

cargo run -p server -- -h

Using verbose log level

To use the verbose log level, use the following command:

cargo run -p client -- -v
cargo run -p server -- -v

Using debug log level

To use the debug log level, use the following command:

cargo run -p client -- -d
cargo run -p server -- -d

Documentation

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

CLI Arguments

Represents command line arguments the CLI application

Client arguments

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')

Server arguments

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')

Contributing

Contributions are welcome. Please follow standard contribution guidelines for pull requests.