{"id":13418186,"url":"https://github.com/google/clif","last_synced_at":"2025-08-21T20:38:22.277Z","repository":{"id":20024348,"uuid":"88560371","full_name":"google/clif","owner":"google","description":"Binding generator to wrap C++ for Python using LLVM.","archived":false,"fork":false,"pushed_at":"2024-09-06T14:09:13.000Z","size":1916,"stargazers_count":980,"open_issues_count":2,"forks_count":125,"subscribers_count":53,"default_branch":"main","last_synced_at":"2025-08-19T18:05:45.838Z","etag":null,"topics":["c-plus-plus","clang","generator","python","wrapper"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/google.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.txt","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":"2017-04-17T23:36:06.000Z","updated_at":"2025-08-18T21:25:56.000Z","dependencies_parsed_at":"2023-09-28T18:52:41.987Z","dependency_job_id":"ec41efc0-aad3-4d4e-9e0d-05fa6bf3e142","html_url":"https://github.com/google/clif","commit_stats":{"total_commits":469,"total_committers":12,"mean_commits":"39.083333333333336","dds":0.4434968017057569,"last_synced_commit":"6b579055bb60af931efe12d3a70d027f3e6726b3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/google/clif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fclif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fclif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fclif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fclif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/google","download_url":"https://codeload.github.com/google/clif/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/google%2Fclif/sbom","scorecard":{"id":436582,"data":{"date":"2025-08-11","repo":{"name":"github.com/google/clif","commit":"5c68484d5b2a625bdede3b42ed05eaa9d99cce97"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.8,"checks":[{"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":10,"reason":"all changesets reviewed","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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"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: containerImage not pinned by hash: Dockerfile:39","Info:   0 out of   1 containerImage 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":"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"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"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: Apache License 2.0: 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":"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":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/google/.github/SECURITY.md:1","Info: Found linked content: github.com/google/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/google/.github/SECURITY.md:1","Info: Found text in security policy: github.com/google/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}}]},"last_synced_at":"2025-08-19T04:49:39.912Z","repository_id":20024348,"created_at":"2025-08-19T04:49:39.918Z","updated_at":"2025-08-19T04:49:39.918Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271368871,"owners_count":24747788,"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-08-20T02:00:09.606Z","response_time":69,"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-plus-plus","clang","generator","python","wrapper"],"created_at":"2024-07-30T22:00:59.436Z","updated_at":"2025-08-21T20:38:22.223Z","avatar_url":"https://github.com/google.png","language":"C++","readme":"# C++ Language Interface Foundation (CLIF)\n\n```\n  ██╗    ██╗ █████╗ ██████╗ ███╗   ██╗██╗███╗   ██╗ ██████╗\n  ██║    ██║██╔══██╗██╔══██╗████╗  ██║██║████╗  ██║██╔════╝\n  ██║ █╗ ██║███████║██████╔╝██╔██╗ ██║██║██╔██╗ ██║██║  ███╗\n  ██║███╗██║██╔══██║██╔══██╗██║╚██╗██║██║██║╚██╗██║██║   ██║\n  ╚███╔███╔╝██║  ██║██║  ██║██║ ╚████║██║██║ ╚████║╚██████╔╝\n   ╚══╝╚══╝ ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝╚═╝╚═╝  ╚═══╝ ╚═════╝\n```\n\n## THIS REPO IS NO LONGER UPDATED — DO NOT USE\n\n## STALE INFORMATION FOLLOWS\n\nPyCLIF defines a C++ API to be wrapped via a concise\n*What You See Is What You Get* interface file\n([example](\nhttps://github.com/google/clif/blob/main/examples/wrapmethod/python/wrapmethod.clif)),\nwith a syntax derived from [pytypedecl](https://github.com/google/pytypedecl).\n\nAbout the name of this repo: CLIF was started as a common foundation for\ncreating C++ wrapper generators for various languages. However, currently\nPython is the only target language, and there is no development activity\nfor other target languages.\n\n## Overview\n\nPyCLIF consists of four parts:\n\n  1. Parser\n  1. Matcher\n  1. Generator\n  1. Runtime\n\n### Parser\n\nThe parser converts a language-friendly C++ API description to the\nlanguage-agnostic internal format and passes it to the Matcher.\n\n### Matcher\n\nThe matcher parses selected C++ headers with Clang (LLVM's C++ compiler) and\ncollects type information.  That info is passed to the Generator.\n\n### Generator\n\nThe generator emits C++ source code for the wrapper.\n\nThe generated wrapper needs to be built according with language extension rules.\nUsually that wrapper will call into the Runtime.\n\n### Runtime\n\nThe runtime C++ library holds type conversion routines that are specific to\neach target language but are the same for every generated wrapper.\n\n## Python CLIF\n\nSee complete implementation of a Python wrapper generator in the `/python/`\nsubdirectory.  Both Python 2 and 3 are supported.\n\n## Installation\n\n### Prerequisites\n\n 1. We use [CMake](http://llvm.org/docs/CMake.html), so make sure CMake\n    version 3.5 or later is available.\n    (For example, Debian 8 only has version 3.0,\n    so in that case you'll need to install an up-to-date CMake.)\n\n 1. We use Google\n    [protobuf](https://developers.google.com/protocol-buffers/docs/downloads)\n    for inter-process communication between the CLIF frontend and backend.\n    Version 3.8.0 or later is required.\n    Please install protobuf for both C++ and Python from source, as we will\n    need some protobuf source code later on.\n\n 1. You must have [virtualenv](https://pypi.python.org/pypi/virtualenv)\n    installed.\n\n 1. You must have pyparsing installed, so we can build protobuf. Use\n    `pip install 'pyparsing==2.2.2'` to fetch the correct version.\n\n 1. Make sure `pkg-config --libs python` works (e.g. install `python-dev` and\n    `pkg-config`).\n\n 1. We use [Clang (LLVM's C++ compiler)](http://llvm.org/) to parse C++ headers,\n    so make sure Clang and LLVM version 11 is available. On Ubuntu and\n    Debian, you can install the prebuilt version from https://apt.llvm.org.\n\n 1. You must have [abseil-cpp](https://github.com/abseil/abseil-cpp) installed.\n\n 1. We use [googletest](https://github.com/google/googletest) for unit testing\n    C++ libraries.\n\nFor references, there is a [Dockerfile](https://github.com/google/clif/blob/main/Dockerfile)\nrunning an Ubuntu image with all the prerequisites already installed. See the\ninstructions at the top of the file.\n\n### Building\n\nTo build and install CLIF to a virtualenv, run:\n\n```bash\nvirtualenv --python=python3.x clif-venv\n./INSTALL.sh clif-venv/bin/python\n```\n\n\nThe following outlines the steps in `INSTALL.sh` for clarification.\n\n1.  Build and install the CLIF backend. If you use\n    [Ninja](https://ninja-build.org/) instead of `make` your build will go\n    significantly faster. It is used by Chromium, LLVM et al. Look at\n    `INSTALL.sh` for the directory setup and proper ...flags... to supply the\n    `cmake` command here:\n\n    ```bash\n    mkdir build\n    cd build\n    cmake ...flags... $CLIFSRC_DIR\n    make clif-matcher\n    make install\n    ```\n\n    Replace the cmake and make commands with these to use Ninja:\n\n    ```bash\n    cmake -G Ninja ...flags... $CLIFSRC_DIR\n    ninja clif-matcher\n    ninja -j 2 install\n    ```\n\n    If you have more than one Python version installed (eg. python3.8 and\n    python3.9) cmake may have problems finding python libraries for the Python\n    you specified as INSTALL.sh argument and uses the default Python instead. To\n    help cmake use the correct Python add the following options to the cmake\n    command (substitute the correct path for your system):\n\n    ```bash\n    cmake ... \\\n      -DPYTHON_INCLUDE_DIR=\"/usr/include/python3.9\" \\\n      -DPYTHON_LIBRARY=\"/usr/lib/x86_64-linux-gnu/libpython3.9m.so\" \\\n      -DPYTHON_EXECUTABLE=\"/usr/bin/python3.9\" \\\n      \"${CMAKE_G_FLAGS[@]}\" \"$CLIFSRC_DIR\"\n    ```\n\n1.  Get back to your CLIF python checkout and install it using pip.\n\n    ```bash\n    cd \"$CLIFSRC_DIR\"\n    cp \"$BUILD_DIR/clif/protos/ast_pb2.py\" clif/protos/\n    cp \"$BUILD_DIR/clif/python/utils/proto_util.cc\" clif/python/utils/\n    cp \"$BUILD_DIR/clif/python/utils/proto_util_clif.h\" clif/python/utils/\n    cp \"$BUILD_DIR/clif/python/utils/proto_util.init.cc\" clif/python/utils/\n    pip install .\n    ```\n\nThat version is guaranteed to work. Older versions likely do not work (they lack\nsome APIs); later versions might work, at your own risk.\n\nINSTALL.sh will build and install clif-matcher to CMake install directory and\nCLIF for Python to the given Python (virtual) environment.\n\nTo run Python CLIF use `pyclif`.\n\n## Using your newly built pyclif\n\nFirst, try some examples:\n\n```bash\ncd examples\nless README.md\n```\n\nNext, read the [Python CLIF User Manual](clif/python/README.md).\n\nFor more details please refer to:\n\n1.  [CLIF Python Primer](clif/python/primer.md)\n1.  [CLIF FAQ](clif/python/faq.md)\n\n## Disclaimer\n\nThis is not an official Google product.\n","funding_links":[],"categories":["TODO scan for Android support in followings","Python","C++"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fclif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgoogle%2Fclif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgoogle%2Fclif/lists"}