{"id":29117197,"url":"https://github.com/gotranspile/cxgo","last_synced_at":"2025-10-21T04:41:33.417Z","repository":{"id":38826235,"uuid":"328435739","full_name":"gotranspile/cxgo","owner":"gotranspile","description":"Tool for transpiling C to Go.","archived":false,"fork":false,"pushed_at":"2025-03-18T09:43:27.000Z","size":385,"stargazers_count":372,"open_issues_count":36,"forks_count":24,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-10-19T23:45:04.165Z","etag":null,"topics":["c","go","transpiler"],"latest_commit_sha":null,"homepage":"https://gotranspile.dev","language":"Go","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/gotranspile.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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},"funding":{"github":"gotranspile","open_collective":"gotranspile"}},"created_at":"2021-01-10T17:08:53.000Z","updated_at":"2025-09-27T23:31:08.000Z","dependencies_parsed_at":"2024-01-18T22:18:43.145Z","dependency_job_id":"a4b7f7d1-5f36-43ba-ba69-2df3b7ed6ab5","html_url":"https://github.com/gotranspile/cxgo","commit_stats":{"total_commits":150,"total_committers":9,"mean_commits":"16.666666666666668","dds":"0.16000000000000003","last_synced_commit":"182293c507c499d9acae210276fa831628857c0a"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/gotranspile/cxgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotranspile%2Fcxgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotranspile%2Fcxgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotranspile%2Fcxgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotranspile%2Fcxgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gotranspile","download_url":"https://codeload.github.com/gotranspile/cxgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gotranspile%2Fcxgo/sbom","scorecard":{"id":442222,"data":{"date":"2025-08-11","repo":{"name":"github.com/gotranspile/cxgo","commit":"e682671cd3c9b33e82e1a0796c7477059aa14178"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/29 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/release.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/release.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gotranspile/cxgo/release.yml/main?enable=pin","Info:   0 out of   9 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/release.yml:9"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.5.2 not signed: https://api.github.com/repos/gotranspile/cxgo/releases/206494101","Warn: release artifact v0.5.1 not signed: https://api.github.com/repos/gotranspile/cxgo/releases/204608220","Warn: release artifact v0.5.0 not signed: https://api.github.com/repos/gotranspile/cxgo/releases/203166688","Warn: release artifact v0.4.3 not signed: https://api.github.com/repos/gotranspile/cxgo/releases/201891741","Warn: release artifact v0.4.2 not signed: https://api.github.com/repos/gotranspile/cxgo/releases/201859803","Warn: release artifact v0.5.2 does not have provenance: https://api.github.com/repos/gotranspile/cxgo/releases/206494101","Warn: release artifact v0.5.1 does not have provenance: https://api.github.com/repos/gotranspile/cxgo/releases/204608220","Warn: release artifact v0.5.0 does not have provenance: https://api.github.com/repos/gotranspile/cxgo/releases/203166688","Warn: release artifact v0.4.3 does not have provenance: https://api.github.com/repos/gotranspile/cxgo/releases/201891741","Warn: release artifact v0.4.2 does not have provenance: https://api.github.com/repos/gotranspile/cxgo/releases/201859803"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T05:49:38.591Z","repository_id":38826235,"created_at":"2025-08-19T05:49:38.591Z","updated_at":"2025-08-19T05:49:38.591Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280207158,"owners_count":26290614,"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","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","go","transpiler"],"created_at":"2025-06-29T11:14:13.424Z","updated_at":"2025-10-21T04:41:33.401Z","avatar_url":"https://github.com/gotranspile.png","language":"Go","funding_links":["https://github.com/sponsors/gotranspile","https://opencollective.com/gotranspile"],"categories":["Go Compilers","Utilities","Go 编译器"],"sub_categories":["Search and Analytic Databases","Utility/Miscellaneous","检索及分析资料库"],"readme":"# C to Go translator\n\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/gotranspile/cxgo/master/LICENSE)\n[![Gitter](https://badges.gitter.im/gotranspile/community.svg)](https://gitter.im/gotranspile/community?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge)\n[![Go Reference](https://pkg.go.dev/badge/github.com/gotranspile/cxgo.svg)](https://pkg.go.dev/github.com/gotranspile/cxgo)\n[![go-recipes](https://raw.githubusercontent.com/nikolaydubina/go-recipes/main/badge.svg?raw=true)](https://github.com/nikolaydubina/go-recipes)\n\nCxGo is a tool for translating C source code to Go (aka transpiler, source-to-source compiler).\n\nIt uses [cc v3](https://modernc.org/cc/v3) for preprocessing and parsing C (no clang/gcc dependencies!) and\na custom type-checker and AST translation layer to make the best output possible.\n\nThe only requirement is: C code **must compile** with `cxgo`, including headers.\n\nHaving said that, `cxgo` uses a few tricks to make this process easier.\n\n**TL;DR for the [project goals](CONTRIBUTING.md#project-goals-and-principles):**\n\n1. Implement a practical C to Go translator ([no C++](https://github.com/gotranspile/cxgo/issues/1) for now).\n2. Keep the output program code correct.\n3. Make the generated code human-readable and as idiomatic as possible.\n4. Make it easy to use and customize.\n\nCheck the [FAQ](FAQ.md) for more common question about the project.\n\n## Status\n\nThe project is **experimental**! Do not rely on it in production and other sensitive environments!\n\nAlthough it was successfully tested on multiple projects, it might _change the behavior_ of the code due to yet unknown bugs.\n\n**Compiler test results:**\n\n- TCC: 62/89 (70%)\n- GCC: 783/1236 (63%)\n\n**Transpiled projects:**\n\n- [Potrace](https://github.com/gotranspile/gotrace) (image vectorization library)\n- [G722](https://github.com/gotranspile/g722) (audio codec)\n- [PortableGL](https://github.com/TotallyGamerJet/pgl) (OpenGL 3.x implementation)\n- [Physac](https://github.com/koteyur/physac-go) (2D physics engine)\n\n## Installation\n\n```bash\ngo install github.com/gotranspile/cxgo/cmd/cxgo@latest\n```\n\nor download the [latest release](https://github.com/gotranspile/cxgo/releases/latest) from Github.\n\n## How to use\n\nThe fastest way to try it is:\n\n```bash\ncxgo file main.c\n```\n\nFor more details, check our [examples](./examples/README.md) section.\n\nIt will guide you through basic usage patterns as well as a more advanced ones (on real-world projects).\n\nYou may also check [FAQ](FAQ.md) if you have any issues.\n\n## Caveats\n\nThe following C features are currently accepted by `cxgo`, but may be implemented partially or not implemented at all:\n\n- preserving comments from C code ([#2](https://github.com/gotranspile/cxgo/issues/2))\n- `static` ([#4](https://github.com/gotranspile/cxgo/issues/4))\n- `auto` ([#5](https://github.com/gotranspile/cxgo/issues/5))\n- bitfields ([#6](https://github.com/gotranspile/cxgo/issues/6))\n- `union` with C-identical data layout ([#7](https://github.com/gotranspile/cxgo/issues/7))\n- `packed` structs ([#8](https://github.com/gotranspile/cxgo/issues/8))\n- `asm`\n- `case` in weird places ([#9](https://github.com/gotranspile/cxgo/issues/9))\n- `goto` forbidden by Go (there is a [workaround](docs/config.md#identsflatten), though, see [#10](https://github.com/gotranspile/cxgo/issues/10))\n- label variables ([#11](https://github.com/gotranspile/cxgo/issues/11))\n- thread local storage ([#12](https://github.com/gotranspile/cxgo/issues/12))\n- `setjmp` (will compile, but panics at runtime)\n- some stdlib functions and types are missing ([good first issue!](CONTRIBUTING.md#adding-a-new-known-header))\n- deep type inference (when converting to Go string/slices)\n- considering multiple `#ifdef` paths for different OS/envs\n\n## Community\n\nJoin our [community](COMMUNITY.md)! We'd like to hear back from you!\n\n## Contributing\n\nSee [CONTRIBUTING](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotranspile%2Fcxgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgotranspile%2Fcxgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgotranspile%2Fcxgo/lists"}