{"id":23888441,"url":"https://github.com/usmanmehmood55/c-toolkit","last_synced_at":"2026-02-17T15:31:19.585Z","repository":{"id":189208227,"uuid":"680253269","full_name":"usmanmehmood55/c-toolkit","owner":"usmanmehmood55","description":"A VSCode extension to help create, build, run, debug and test C projects using CMake.","archived":false,"fork":false,"pushed_at":"2025-01-13T17:24:54.000Z","size":2499,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-04-10T05:07:49.376Z","etag":null,"topics":["c","cmake","cpp","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=UsmanMehmood.c-toolkit","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/usmanmehmood55.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-18T18:12:59.000Z","updated_at":"2025-01-13T17:24:57.000Z","dependencies_parsed_at":"2023-11-16T16:29:55.369Z","dependency_job_id":"221ebe47-3d48-4eaf-b356-10841c91f216","html_url":"https://github.com/usmanmehmood55/c-toolkit","commit_stats":null,"previous_names":["usmanmehmood55/c-toolkit"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanmehmood55%2Fc-toolkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanmehmood55%2Fc-toolkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanmehmood55%2Fc-toolkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/usmanmehmood55%2Fc-toolkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/usmanmehmood55","download_url":"https://codeload.github.com/usmanmehmood55/c-toolkit/tar.gz/refs/heads/development","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161273,"owners_count":21057555,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","cmake","cpp","vscode-extension"],"created_at":"2025-01-04T09:00:25.200Z","updated_at":"2026-02-17T15:31:19.555Z","avatar_url":"https://github.com/usmanmehmood55.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# C C++ Toolkit\n\nA VSCode extension to help create, build, run, debug and test C and C++ projects\nusing CMake.\n\n![Visual Studio Marketplace Downloads](https://img.shields.io/visual-studio-marketplace/d/UsmanMehmood.c-toolkit)\n![Visual Studio Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/UsmanMehmood.c-toolkit)\n\n## Features\n\n- [Status bar buttons](#status-bar-buttons).\n- [Generates new C and C++ projects](#project-generation).\n- [Generates new libraries (components)](#component-generation).\n- [Checks for and installs missing build tools](#missing-build-tools).\n- [Generates project VSCode configurations](#refreshing-project-configuration).\n- [Snippets](#snippets)\n\n## Important Note\n\nIf you find a bug or have a suggestion, please [open a new issue](https://github.com/usmanmehmood55/c-toolkit/issues)\nand help me make this extension better. :)\n\n## Status Bar Buttons\n\nSeven status bar buttons have been implemented to:\n\n- Select build type (Release, Debug)\n- Clean\n- Build\n- Run\n- Debug\n- Test\n- Debug Test\n\n## Project Generation\n\nA new C or C++ project can be created with necessary biolerplate code using\nthe `C C++ Toolkit: Create New C Project` or `C C++ Toolkit: Create New C++ Project`\ncommands in the command palette. To access the command palette, use\n`ctrl + shift + p`.\n\nIt would then ask the user to select a base folder in which the project\nfolder is to be placed. When a base folder is selected, the user would be\nasked to input the project name.\n\n### Project Files\n\nThe new project folder would contain these pre-configured items:\n\n- `.vscode` folder\n- `CMakeLists.txt`\n- `main.c` if it is a C project.\n- `main.cpp` if it is a C++ project.\n\nThe user can then start adding their own libraries or \"components\" via the\ncomponent generation feature.\n\n## Component Generation\n\nA new component can be created with some biolerplate code by using the\n`C C++ Toolkit: Create New Component` command in the command palette. It\nwould then ask the user to input the component name and give the option\nto make the component \"mocked\" and \"tested\".\n\n### Mocked Components\n\n\"Mocked\" means a mock file would be created inside a \"mock\" folder. If\nthe component name is `library`, the mock file would be `mock_library.c`.\nA CMake variable `ENABLE_LIBRARY_MOCK` is also added to the root CMakeLists\nfile. It can be enabled during the build invocation to compile the mock source\ninstead of the actual source.\n\n### Tested Components\n\n\"Tested\" means test header and source files would be created inside\na \"test\" folder. If the component name is `library` then the test files\nwould be `test_library.h` and `test_library.c`. A CMake variable\n`ENABLE_LIBRARY_TEST` is also added to the root CMakeLists file. It can be\nenabled during the build invocation to compile the test files as well.\n\n### Component Files\n\nA component would have the following files\n\n- `include/component.h`\n- `src/component.c`\n- `mock/mock_component.c`\n- `test/test_component.h`\n- `test/test_component.c`\n- `CMakeLists.txt`\n\nIt would also modify the root CMakeLists.txt to add the new component. Naturally\nif the project is C++ instead of C, the `.h` files will be `.hpp` and `.c` files\nwill be `.cpp`.\n\n## Missing Build Tools\n\nThe extension checks if the required build tools are installed by trying to\nfind them in the `PATH`, if any of them is not detected by the extension it\nthen offers to install the missing tools.\n\n![Asks the user for installation of tools](images/tools_ask_installation.PNG)\n\nOnce installation of the missing tools is complete, it asks the user if VSCode\ncan be restarted.\n\n![Tools are installed](images/tools_installed.PNG)\n\nThe build tools are installed via these package managers:\n\n- Advance Package Tool (APT) for Linux.\n- Homebrew for MacOS.\n- Scoop for Windows.\n\nSince Windows does not come pre-installed with Scoop, the ability to install\nScoop itself has also been added. Once the tools are installed, the user is\ninformed, and asked to close and re-open VS Code.\n\nThe command `C C++ Toolkit: Search For Build Tools` in the command palette can\nalso be used to manually trigger this.\n\n## Refreshing Project Configuration\n\nTo refresh the project configurations in the `.vscode` folder, use the command\n`C C++ Toolkit: Refresh Configurations` in the command palette. Use this carefully,\nas it overwrites previous configurations. For safe usage, the option to backup\nprevious `.vscode` folder is also provided.\n\n## Snippets\n\nThe extension adds useful snippets for creating functions and attributes.\n\n- functions\n  - int (`intfunc`)\n  - int8_t to int64_t (`int8func`, `int16func`, `int32func`, `int64func`)\n  - uint8_t to uint64_t (`uint8func`, `uint16func`, `uint32func`, `uint64func`)\n  - float (`flfunc`)\n  - double (`doubfunc`)\n  \n  ![functions snippet](images/functions.gif)\n\n- attributes\n  - packed (`packed`)\n  - aligned (`aligned`)\n  - unused (`unused`)\n  - weak (`weak`)\n  \n  ![attributes snippet](images/attributes.gif)\n\n## Extras\n\nDo you want to do learn how to manually create new projects, manually compile\nyour code and install build tools? Check out my blog on Medium. This extension\nmore or less automates the same things mentioned in this blog.\n\n[Setup Guide for C/C++ Programming on VSCode](https://medium.com/p/b6047463dc1c)\n\nAlso check out the website for this extension.\n\n[cpptoolkit.com](https://cpptoolkit.com/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmanmehmood55%2Fc-toolkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fusmanmehmood55%2Fc-toolkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fusmanmehmood55%2Fc-toolkit/lists"}