{"id":34066883,"url":"https://github.com/realitix/pyshaderc","last_synced_at":"2026-04-01T20:22:25.551Z","repository":{"id":18220744,"uuid":"83829132","full_name":"realitix/pyshaderc","owner":"realitix","description":"Python CFFI binding for shaderc","archived":false,"fork":false,"pushed_at":"2024-01-18T08:22:50.000Z","size":18484,"stargazers_count":21,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-28T00:39:34.582Z","etag":null,"topics":["cffi","glsl","python","shaderc"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/realitix.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-03-03T18:33:33.000Z","updated_at":"2026-02-18T12:18:33.000Z","dependencies_parsed_at":"2022-07-26T02:31:54.601Z","dependency_job_id":null,"html_url":"https://github.com/realitix/pyshaderc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/realitix/pyshaderc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realitix%2Fpyshaderc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realitix%2Fpyshaderc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realitix%2Fpyshaderc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realitix%2Fpyshaderc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realitix","download_url":"https://codeload.github.com/realitix/pyshaderc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realitix%2Fpyshaderc/sbom","scorecard":{"id":766551,"data":{"date":"2025-08-11","repo":{"name":"github.com/realitix/pyshaderc","commit":"1d5bfb3082113d6e456124677080db05ecaf8838"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"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":0,"reason":"Found 1/30 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":"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":"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"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 'master'"],"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 1 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"}}]},"last_synced_at":"2025-08-23T01:00:23.094Z","repository_id":18220744,"created_at":"2025-08-23T01:00:23.095Z","updated_at":"2025-08-23T01:00:23.095Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291531,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["cffi","glsl","python","shaderc"],"created_at":"2025-12-14T06:53:07.202Z","updated_at":"2026-04-01T20:22:25.526Z","avatar_url":"https://github.com/realitix.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyShaderc\n\n[![Build Status](https://travis-ci.org/realitix/pyshaderc.svg?branch=master)](https://travis-ci.org/realitix/pyshaderc)\n\nTable of Contents\n=================\n\n  * [What is it ?](#what-is-it-)\n  * [API](#api)\n  * [Installation](#installation)\n  * [How to use it](#how-to-use-it)\n    * [Getting started](#getting-started)\n    * [Include support](#include-support)\n  * [How to update shaderc](#how-to-update-shaderc)\n  * [Community](#community)\n  * [Supported By](#supported-by)\n\n\n## What is it ?\n\nThis module allow you to compile glsl to Spir-V in Python.\nIt leverages power of the great [shaderc](https://github.com/google/shaderc)\nlibrary to compile glsl.\n\n\n## API\n\n```python\ndef set_include_paths(paths):\n    \"\"\"Set include paths\n\n    This function allows you to update the include paths.\n    Include paths are used with #include \u003cfile\u003e.\n\n    Args:\n        paths (list[str]): List of paths\n    \"\"\"\n\ndef compile_file_into_spirv(filepath, stage, optimization='size',\n                            warnings_as_errors=False):\n    \"\"\"Compile shader file into Spir-V binary.\n\n    This function uses shaderc to compile your glsl file code into Spir-V\n    code.\n\n    Args:\n        filepath (str): Absolute path to your shader file\n        stage (str): Pipeline stage in ['vert', 'tesc', 'tese', 'geom',\n                     'frag', 'comp']\n        optimization (str): 'zero' (no optimization) or 'size' (reduce size)\n        warnings_as_errors (bool): Turn warnings into errors\n\n    Returns:\n        bytes: Compiled Spir-V binary.\n\n    Raises:\n        CompilationError: If compilation fails.\n    \"\"\"\n\ndef compile_into_spirv(raw, stage, filepath, language=\"glsl\",\n                       optimization='size', suppress_warnings=False,\n                       warnings_as_errors=False):\n    \"\"\"Compile shader code into Spir-V binary.\n\n    This function uses shaderc to compile your glsl or hlsl code into Spir-V\n    code. You can refer to the shaderc documentation.\n\n    Args:\n        raw (bytes): glsl or hlsl code (bytes format, not str)\n        stage (str): Pipeline stage in ['vert', 'tesc', 'tese', 'geom',\n                     'frag', 'comp']\n        filepath (str): Absolute path of the file (needed for #include)\n        language (str): 'glsl' or 'hlsl'\n        optimization (str): 'zero' (no optimization) or 'size' (reduce size)\n        suppress_warnings (bool): True to suppress warnings\n        warnings_as_errors (bool): Turn warnings into errors\n\n    Returns:\n        bytes: Compiled Spir-V binary.\n\n    Raises:\n        CompilationError: If compilation fails.\n    \"\"\"\n```\n\n## Installation\n\n**Note (Linux): You need `cmake` and `make`**\n\n**Note (Windows): You need `cmake` and [Visual C++ 2015 Build Tools](http://landinghub.visualstudio.com/visual-cpp-build-tools). Set environment configuration with *Visual C++ 2015 x64 Native Build Tools Command Prompt* in the start menu.**\n\n```python\npip install pyshaderc\n```\n\nOr if you want the latest version:\n\n```python\ngit clone https://github.com/realitix/pyshaderc.git\ncd pyshaderc\npython setup.py build\npython setup.py install\n```\n\n\n## How to use it\n\n### Getting started\n\nSo simple !\n\n```python\nimport pyshaderc\nspirv = pyshaderc.compile_file_into_spirv('/tmp/myshader.vs.glsl', 'vert')\n```\n\nIf you want more control, you can use the lower-level function\n`compile_into_spirv`.\n\n### Include support\n\nPyshaderc supports `#include` preprocessor thanks to shaderc.\nThere are two ways to use it:\n\n**`#include \"myfile\"`**\n\nInclude file relatively, it's intuitive.\n\n**`#include \u003cmyfile\u003e`**\n\nLike in C, you can include from a list of paths. To use this way to include,\nyou must call `set_include_paths` with a list of directories to search for\nbefore compiling your glsl code.\n\n\n## How to update shaderc\n\nDownload the last shaderc version on github, put the third party libs in it\nand just zip it. Then update the build script with the new zip name.\n\n\n## Community\n\nYou can checkout my blog, I speak about **PyShaderc**:\n[Blog](https://realitix.github.io)\n\n## Supported By\n\nPyShaderc is supported by helpful 3rd parties via code contributions, test devices and so forth.\nMake our supporters happy and visit their sites!\n\n![linagora](https://www.linagora.com/sites/all/themes/tux/logo.png)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealitix%2Fpyshaderc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealitix%2Fpyshaderc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealitix%2Fpyshaderc/lists"}