Crates.io | sticks |
lib.rs | sticks |
version | 0.1.14 |
source | src |
created_at | 2023-11-08 07:22:16.832809 |
updated_at | 2024-10-17 09:15:19.401806 |
description | A tool for managing C and C++ projects |
homepage | |
repository | https://github.com/mAmineChniti/sticks |
max_upload_size | |
id | 1028809 |
size | 37,198 |
Sticks is a Rust command-line tool for managing C and C++ projects. It simplifies the process of creating new projects and managing dependencies in your Makefile.
Before proceeding with the quick install, please make sure you have Rust installed. If you don't have Rust installed, you can download and install it from the official Rust website.
curl -fsSL https://rebrand.ly/tyzot1g | bash
OR
cargo install sticks
sudo apt remove sticks -y
OR
cargo uninstall sticks
To use sticks
, you'll need to build the project:
Clone the repository:
git clone https://github.com/mAmineChniti/sticks.git
Change the current directory to the project folder:
cd sticks
Build the project using cargo:
cargo build --release
Once the build is complete, you can find the binary in the target/release directory. You can add this directory to your system's PATH for convenient usage.
To create a new C project, use the following command:
sticks c <project_name>
To create a new C++ project, use the following command:
sticks cpp <project_name>
Replace <project_name> with the name of your project.
These commands will create a new project directory with the specified name, set up a source file, and create a basic Makefile. The source file will contain a "Hello, World!" program in C++ or C.
If you want to initialize a new project directly in the current directory, use these commands:
To initialize a new C project in the current directory, use:
sticks init c
To initialize a new C++ project in the current directory, use:
sticks init cpp
These commands will create a new project based on the current directory name, set up a source file, and create a basic Makefile. The source file will contain a "Hello, World!" program in C++ or C, depending on the chosen project type.
To add a dependency to your project's Makefile, use the following command:
sticks add <dependency_name>
Replace <dependency_name> with the name of the dependency you want to add. Sticks will automatically modify your Makefile to include the new dependency. If the install-deps rule doesn't exist in your Makefile, Sticks will create it for you.
To enhance the functionality of your project, you can easily add one or multiple source files and their corresponding headers using the following command:
sticks src <source_names>
Replace <source_names> with the names of the source files you want to add, separated by spaces. Sticks will intelligently update your project structure, including the necessary modifications to your Makefile.
For additional assistance and to explore available commands, use the help subcommand:
sticks help
To ensure you have the latest features and bug fixes, it's essential to keep your Sticks installation up to date:
sticks update
sticks remove <dependency_name>
command.install-deps
rule when there are no more dependencies left to install.sticks add
.If you'd like to contribute to Sticks or report issues We welcome contributions and feedback from the community, all you have to is open an issue or fork this repo to contribute.
Fore more details visit CONTRIBUTING
This project is licensed under the MIT License. See the LICENSE file for details.
For any inquiries, feel free to email us at emin.chniti@esprit.tn.