{"id":19351549,"url":"https://github.com/opensourcedoc/ccrun","last_synced_at":"2026-04-14T04:31:03.739Z","repository":{"id":77782881,"uuid":"223825149","full_name":"opensourcedoc/ccrun","owner":"opensourcedoc","description":"Run C or C++ Source Automatically","archived":false,"fork":false,"pushed_at":"2021-12-14T12:52:07.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-18T04:03:01.865Z","etag":null,"topics":["c","c-language","c-plus-plus","clang","code-runner","cpp","freebsd","gcc","shell-script","unix"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/opensourcedoc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2019-11-24T23:23:03.000Z","updated_at":"2022-01-31T23:47:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"21301bb1-322a-4c4c-aab2-c9c57c44a1b7","html_url":"https://github.com/opensourcedoc/ccrun","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/opensourcedoc/ccrun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fccrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fccrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fccrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fccrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opensourcedoc","download_url":"https://codeload.github.com/opensourcedoc/ccrun/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opensourcedoc%2Fccrun/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31782736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","c-language","c-plus-plus","clang","code-runner","cpp","freebsd","gcc","shell-script","unix"],"created_at":"2024-11-10T04:36:34.928Z","updated_at":"2026-04-14T04:31:03.716Z","avatar_url":"https://github.com/opensourcedoc.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ccrun\n\n`ccrun`, aka *C* or *C*++ *Run*ner, compiles and executes C or C++ code base automatically.\n\n## Warning\n\n`ccrun` will compile and execute target source. Hence, DON'T USE `ccrun` to run UNTRUSTED source.\n\n## Why `ccrun`?\n\nC or C++ are compiled languages. We have to compile its source before executing it. Nevertheless, it is tedious to compile C or C++ source manually. For small code base, it is overkill to write Makefile or other project configuration file as well.\n\nTo address the issue, `ccrun` can automatically compile and execute C or C++ source without any project configuration file, handy for small code base.\n\n## System Requirements\n\n`ccrun` itself is written in POSIX shell. Besides, you need a C or C++ compiler to compile target source.\n\nBy default, `ccrun` will invoke `gcc` or `g++` for compilation tasks. You may change to another C or C++ compiler by setting related environment variables.\n\nWe tested `ccrun` against several Unix or Unix-like systems:\n\n* Ubuntu 20.04 LTS\n* Rocky Linux 8.5\n* openSUSE Leap 15.3\n* FreeBSD 13.0\n\nIt should work on other Unix or Unix-like systems as well.\n\n## Supported File Formats\n\n`ccrun` supports the following file formats:\n\n* *.c* for C source\n* *.cpp*, *.cxx* or *.cc* for C++ source\n\n`ccrun` can handle projects that mix C and C++ together.\n\n## Usage\n\nAdd exec mode for `ccrun` before using it:\n\n```\n$ chmod +x path/to/ccrun\n```\n\nIt is recommended to copy `ccrun` to a valid **$PATH** like *$HOME/bin* or */usr/local/bin*.\n\nRun single source:\n\n```\n$ ccrun path/to/file.c\n```\n\nRun multiple sources in a project:\n\n```\n$ ccrun path/to/*.c\n```\n\nRun multiple C and C++ mixed sources in a project:\n\n```\n$ ccrun path/to/*.c path/to/*.cpp\n```\n\nRun target sources with arguments:\n\n```\n$ ccrun path/to/*.c -- --opt param_a param_b param_c\n```\n\n## Environment Variables\n\nYou can adjust the behavior of `ccwarn` with the following environment variables:\n\n* **CC** to set GCC compiler\n* **CXX** to set G++ compiler\n* **OUT_FILE** to set the name of a temporary output file\n* **CFLAGS** to set custom include paths and compiler flags for C\n* **CXXFLAGS** to set custom include paths and compiler flags for C++\n* **LDFLAGS** to set custom lib paths\n* **LIBS** to set custom library linkages\n* **LD_LIBRARY_PATH** to set custom binary file paths\n\nAll environment variables are optional, set with sensible default values.\n\n## Note\n\nIf you want to check code quality and conform some language standard for your C or C++ source, see [ccwarn](https://github.com/cwchentw/ccwarn).\n\n## Copyright\n\nCopyright (c) 2019 Michelle Chen. Licensed under [MIT](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensourcedoc%2Fccrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopensourcedoc%2Fccrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopensourcedoc%2Fccrun/lists"}