Contributing
We love contributions! Whether you have ideas, suggestions, or bug reports, feel free to open an issue or submit a pull request. Your input is essential to helping us improve macmon
.
Setting Up the Development Environment
To get started with developing macmon
, you'll need to set up the Rust toolchain and clone the repository.
-
Install Rust: If you don't have it already, install the Rust toolchain from rust-lang.org.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
-
Clone the Repository:
git clone https://github.com/vladkens/macmon.git cd macmon
Building and Running
- Build for Release: To create an optimized executable, use the following command. The binary will be located at
target/release/macmon
.
cargo build --release
- Run for Development: To build and run the application directly, use:
cargo run --release
# Or for a quicker debug build:
# cargo run
Running Checks and Lints
Before submitting a pull request, please ensure your code passes all checks and adheres to the project's coding style. The Makefile
provides a convenient lint
command for this.
make lint
This command will run the following checks:
cargo fmt --check
: Ensures the code is formatted correctly.cargo clippy
: Lints the code for common mistakes and style issues.cargo check
: Compiles the project without producing a binary to check for errors.
Submitting Changes
- Fork the repository on GitHub.
- Create a new branch for your feature or bug fix.
- Commit your changes with clear and descriptive messages.
- Push your branch to your fork.
- Open a Pull Request to the
main
branch of the original repository.