A command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects.

Overview

CCake

GitHub rust-shield Rust GitHub code size in bytes discord-shield

CCake is a command line tool written in Rust and designed to be a modern build tool + package manager for C/C++ projects.

Goals

  • To be easily understood by and accessible to beginner C/C++ developers.
  • To familiarize beginner C/C++ developers with how C/C++'s build steps (preprocessing, compiling, linking, assembling, etc.) work.
  • To keep CCake expressive in such a way that it feels familiar with other build and packaging tools such as npm, yarn, gradle and cargo.
  • To make CCake cross-platform.
  • To streamline the file structure for C/C++ projects into a more modern design pattern becoming increasingly and commonly used throughout the industry.
  • To prioritize good project design patterns and habits over CCake's own backwards-compatibility (as the default).*
  • To supplement modern compiler systems by making compiler input arguments more accessible to users (such as passing /src files into the compiler instead of the user manually doing so).
  • To support backwards compatibility for compilers where necessary and possible.*

*Clarification: CCake as a tool does not seek to be backwards compatible in regards to running CCake's commands. However, maintaining backwards compatibility for compilers (such as GCC or Clang) is a goal that is in mind.

Non-Goals

  • It is not a goal for CCake to support languages other than C/C++ at the time of writing.
  • It is not a goal of CCake to implement custom scripting of any kind. While scripting is powerful, CCake should only ever be powerful enough to delegate such tasks to external software; i.e, if you want to tool your build environment around usage of python scripting, CCake should be able to run Python scripts in the pipeline through shell commands, but not much more than that.
  • It is not a goal of the CCake project to preserve backwards compatibility (in regards to CCake) as the default behavior for CCake. In other tools such as with CMake, this method has proven over time to be detrimental to the longevity of CMake and the accessibility of newer developers, as CMake over time has improved and modernized to take better approaches to certain tasks, but has left the less optimal approaches as the defaults. Moreover, documentation online has grown to a point where older references now show sub-optimal approaches as opposed to modern, optimal approaches to project management. Therefore, it is an imperative of CCake to put modern designs at the forefront, and for backwards-compatibility to be supported through A) versioning and B) opt-in flags to CCake.

Future Goals

These are far-future goals that are not goals at the moment, but are slated to become goals after CCake has satisified its original goals in a release environment.

  • An install system for compilers. Expected behavior would be to download compilers via ccake install clang, which would install the clang compiler to a .ccake folder on the user's system. Implemented.
  • An install system for third-party libraries in a manner similar to that of Java's or Node's library ecosystems. Expected behavior would be to download some library like GLFW using a command ccake install glfw without need to manually link/touch the library's downloaded files.
  • Introducing a [dependencies] section within ccake.toml that would support a command such as ccake install to download all necessary library files, such that third parties do not have their files distributed through parties other than the maintainer/owner of said files.

Build

  • Install cargo for Rust.
  • Clone the project and cd into the project directory.
  • Run cargo build in the root directory of the project.

Usage

  • Use cargo run -- <ccake args> to test ccake. Example: cargo run -- --version

Examples on Windows

  • Run cargo build and then add the generated executable to your environment variables path. This will allow you to invoke the ccake command in the terminal.
  • Run ccake install mingw to install a portable GCC compiler toolchain. This command will also set CCake's default C/C++ compiler paths to GCC/G++ respectively.
  • cd into any of the projects found in the examples folder.
  • Run ccake build. This should output an executable for the binary projects into an out folder.
  • Run the executable.

Examples on Linux

  • Linux is not yet supported by CCake. PRs are welcome to add Linux support.
Comments
  • Use `dialoguer` instead of rolling your own interaction system

    Use `dialoguer` instead of rolling your own interaction system

    Is your feature request related to a problem? Please describe. The functionality in /src/lib/terminal/prompt.rs would be better served by the dialoguer crate.

    Describe the solution you'd like Use the premade solution instead.

    Describe alternatives you've considered I tried rolling my own input system when I started writing Rust and it grew tangled and messy as scope expanded. I don't advise it.

    enhancement 
    opened by w4veform-dev 1
  • Use GitHub Actions to run unit tests on push instead of locking down commits

    Use GitHub Actions to run unit tests on push instead of locking down commits

    Is your feature request related to a problem? Please describe. Locking down commits with /hooks/pre-commit makes version control and collaboration more difficult.

    Describe the solution you'd like Use GitHub Actions and unit tests to ensure functionality instead.

    opened by w4veform-dev 1
  • Use standard log crate

    Use standard log crate

    Is your feature request related to a problem? Please describe.

    Consider using a community standard logging facade: https://crates.io/crates/log Rather than the implementation we have src/terminal/ansi.rs

    Describe the solution you'd like

    • A logging solution which is accessible
      • Everything uses this and changing the log level will be helpful for any dependency troubleshooting

    Describe alternatives you've considered None as of now

    Additional context Add any other context or screenshots about the feature request here.

    enhancement 
    opened by aburd 1
  • Install script aliasing

    Install script aliasing

    Is your feature request related to a problem? Please describe. If a user wants to install gcc on Windows, they currently have to run ccake install mingw. There are a couple problems with this. MinGW will not be necessary on linux machines, as gcc should be the native toolchain. A linux user should therefore not be expected to run ccake install mingw, but ccake install gcc instead. Ideally, both windows and linux users should have to type the same thing, which should be ccake install gcc.

    Describe the solution you'd like If a Windows user types ccake install gcc, CCake should really treat the identifier gcc as mingw, but only on Windows.

    Describe alternatives you've considered N/A

    Additional context N/A

    enhancement 
    opened by bvanseg 1
  • Default behavior with no arguments passed

    Default behavior with no arguments passed

    Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

    ccake doesn't do anything by default when you call it with no args (e.g. ccake)

    Describe the solution you'd like A clear and concise description of what you want to happen.

    I would like some direction from the tool. Most tools will print a message saying what you did wrong or a help message.

    Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

    I haven't considered any at this time. I suppose even a non-zero exit code would be helpful feedback.

    Additional context Add any other context or screenshots about the feature request here.

    bug 
    opened by aburd 0
  • The `derive` feature flag is enabled for clap, but the attribute macros are not used.

    The `derive` feature flag is enabled for clap, but the attribute macros are not used.

    Is your feature request related to a problem? Please describe. It's inefficient

    Describe the solution you'd like Either use the macros or disable the feature flag

    enhancement 
    opened by w4veform-dev 0
  • Feat/refactor config

    Feat/refactor config

    Description

    Refactors config.rs and settings.rs with impl blocks

    What

    • Move some logic from build_project.rs to Config and Settings structs
    • Add comments where necessary
    • Add idiomatic impl blocks for the above structs with methods like new when necessary

    Why

    • To make it easier to use the Config and Settings structs
    • To make it easier to read modules that use the above structs
    opened by aburd 0
  • Enhancement: Project restructure

    Enhancement: Project restructure

    • Restructures the project's commands into an intuitive design pattern.
    • Migrates old "heavy-lifting" code into a lib folder from which the command exec functions can reference.
    enhancement 
    opened by bvanseg 0
  • Feat/script aliasing

    Feat/script aliasing

    Description

    resolves #4

    Notes

    Uses HashMap for aliases, but this could easily be converted into a toml file, etc. if the need for keeping all the aliases in a separate place arises.

    enhancement 
    opened by aburd 0
  • Feat/custom commands

    Feat/custom commands

    resolves #13

    Description

    • Adds "commands" section to ccake.toml
    • Adds "run" command to clap
    • Adds run_command to lib for basic running of ccake.toml commands
    opened by aburd 0
  • Custom Commands

    Custom Commands

    Is your feature request related to a problem? Please describe. CCake's existing function set is sound enough to be able to build a simple C/C++ project, but when it comes to more complex projects that may have more needs, CCake's existing set of commands is not sufficient to complete complex tasks.

    Describe the solution you'd like To allow for more complex projects, CCake can greatly benefit from custom commands that can be executed through a new command, such that the cli input looks like the following: ccake run <custom-command-name>.

    These custom commands would be defined in the ccake.toml file like so:

    [commands]
    clean-build = "ccake build --clean"
    install-build = "ccake install && ccake build"
    # python and shell scripts should also be valid, not just ccake commands :)
    

    Describe alternatives you've considered N/A.

    Additional context N/A.

    enhancement 
    opened by bvanseg 1
  • Verify that a tool/lib is already installed before attempting to install

    Verify that a tool/lib is already installed before attempting to install

    Is your feature request related to a problem? Please describe. Currently, install scripts will run with no problem, even if the installed tool/library is already present. This ideally shouldn't happen.

    Describe the solution you'd like Within the ccake install command logic, verify that the target tool/lib is already present on the system before attempting to download. If the user really wants to redownload the package, they should be allowed to with a --force/-f flag (Ex. ccake install mingw --force or ccake install mingw -f).

    Describe alternatives you've considered N/A

    Additional context N/A

    enhancement 
    opened by bvanseg 0
  • Search for and use native toolchains before installing

    Search for and use native toolchains before installing

    Is your feature request related to a problem? Please describe. Currently, ccake install will pull a download script and attempt to install the target tool/lib without any questions. The problem with this is that when used for toolchains, the toolchain may already be located on the user's system somewhere. If the versions of the ccake install target and the native toolchain match up, then the native toolchain should be preferred instead of needlessly redownloading it to .ccake/cache.

    Describe the solution you'd like Search the user's system for the native toolchain and use that toolchain instead of redownloading it. If a user is trying to use gcc for example, but gcc is already present, the native gcc should be preferred only if its versioning is greater or equal to the current install target.

    Describe alternatives you've considered N/A

    Additional context N/A

    enhancement 
    opened by bvanseg 0
  • Multi-version support of packages

    Multi-version support of packages

    Is your feature request related to a problem? Please describe. Currently, CCake supports installing a single toolchain such as MinGW in a global scope (within a .ccake file in the user's home dir). While this is convenient, it will become a hassle if some project A needs version X of the same toolchain that also happens to be used in another project B as version Y.

    Describe the solution you'd like To avoid duplicate dependencies across multiple projects, packages should still be maintained globally, but different versions should be maintained under the same tool/lib name. Projects should contain a dependencies section where dependency identifiers (keys) along with their versions (values) can be specified. Ultimately in the CLI this would look like ccake install mingw@version where version is some version identifier specific to the tool or library. On the file system, mingw would be a folder within the .ccake/cache folder which contains folder names matching the version (Ex. .ccake/cache/mingw/x.y.z).

    Describe alternatives you've considered N/A.

    Additional context The prescribed design is similar to Gradle. However, this design can lead to bit rot, where unused dependencies in the global scope are no longer used, but still sit on the file system taking up unnecessary space. To help prevent this, CCake could potentially keep track of where dependencies are used in what projects. If a dependency no longer has references to any projects on the file system, it could be safely cleaned up with a ccake clean command.

    enhancement 
    opened by bvanseg 0
Owner
Boston Vanseghi
Boston Vanseghi
Gecko's trusty package manager and command-line utility.

Geckos have super-powers, ya'know? Grip is Gecko's trusty package manager and command-line utility. USAGE: grip [FLAGS] [file] [SUBCOMMAND] FLAGS

Gecko 2 Jan 3, 2022
BASIC build system and package manager.

Bargo BASIC build system and package manager. Bargo is a tool to make it simpler to program in the BASIC programming language. Early versions of BASIC

Vasco Costa 3 Apr 6, 2024
A blazing fast command line license generator for your open source projects written in Rust🚀

Overview This is a blazing fast ⚡ , command line license generator for your open source projects written in Rust. I know that GitHub

Shoubhit Dash 43 Dec 30, 2022
A Command-line tool to create, manage and deploy your python projects

PPM A Command-line tool to create, manage and deploy your python projects Table of Contents PPM Main Features Create a Project project.ini file Projec

FUSEN 6 Aug 30, 2022
An open source artifact manager. Written in Rust back end and an Vue front end to create a fast and modern experience

nitro_repo Nitro Repo is an open source free artifact manager. Written with a Rust back end and a Vue front end to create a fast and modern experience

Wyatt Jacob Herkamp 30 Dec 14, 2022
Small command-line tool to switch monitor inputs from command line

swmon Small command-line tool to switch monitor inputs from command line Installation git clone https://github.com/cr1901/swmon cargo install --path .

William D. Jones 5 Aug 20, 2022
Plexisort is a command-line tool designed to organize your files based on metadata.

Plexisort is a command-line tool designed to organize your files based on metadata. It allows for flexible source and destination directory settings, supports dry-run operations for safe previews of potential changes, and even offers an undo functionality for reversing the last set of file movements.

Richard Chukwu 7 Apr 29, 2024
Command-line tool designed to simplify the process of managing multiple .NET SDK versions on your system

.NET Version Manager (dver) Overview dver is a command-line tool designed to simplify the process of managing multiple .NET SDK versions on your syste

Sergio Triana Escobedo 5 Aug 23, 2024
A simple cli to clone projects and fetch all projects in a GitHub org..

stupid-git A simple cli to clone projects and update all projects. get all repository from GitHub clone all pull all with git stash Usage create sgit.

Fengda Huang 5 Sep 15, 2022
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its proof-of-concept (PoC) phase. Huak

Chris Pryer 186 Jan 9, 2023
📦 A Python package manager written in Rust inspired by Cargo.

huak About A Python package manager written in Rust. The Cargo for Python. ⚠️ Disclaimer: huak is currently in its Alpha phase. Huak aims to support a

Chris Pryer 161 Oct 9, 2022
A new gen package manager, written in rust

Run It run it is a package manager that is based on containers (yes like apx but declarative and written in rust), the difference is that run it is we

null 7 Sep 6, 2024
The official command-line interface for the makedeb Package Repository

mpr-cli This is the repository for the MPR CLI, the official command-line interface for the makedeb Package Repository. Installation Users have a few

makedeb 38 Jan 2, 2023
A simple build tool for c and c++ projects

BUILDER_CPP A simple build tool for building C and C++ applications The tool is still in development. Do not use for production code. Installation The

null 8 Apr 4, 2023
KAIVM is a multiplatform Command Line Interface (CLI) designed to simplify the process of downloading, managing, configuring, and running different versions of Shinkai Node

KAIVM - Shinkai Version Manager KAIVM is a multiplatform Command Line Interface (CLI) designed to simplify the process of downloading, managing, confi

Alfredo Gallardo 7 May 1, 2024
rpm (Rust project manager) is a tool that helps you to manage your rust projects

rpm rpm (Rust project manager) is a open source tool for managing your rust project in an organized way Installation # make sure you have rust install

Dilshad 4 May 4, 2023
A tool crate to quickly build rust command line application.

Falsework A tool crate to quickly build rust command line application.

Leon Ding 103 Dec 12, 2022
Tool to build OSX package installers

?? Pak MacOS package installer builder What does pak do? Pak builds MacOS package installers from a project file. Since apple removed PackageBuilder f

ash 2 Feb 21, 2022
The safe, fast and sane package manager for Linux

moss-rs A rewrite of the Serpent OS tooling in Rust, enabling a robust implementation befitting Serpent and Solus We will initially focus on moss and

Serpent OS 16 Oct 10, 2023