{"id":13670956,"url":"https://github.com/fantix/kloop","last_synced_at":"2025-10-08T19:07:29.063Z","repository":{"id":37266786,"uuid":"471718092","full_name":"fantix/kloop","owner":"fantix","description":"OFFICIAL MIRROR. An asyncio event loop using Linux io_uring and kTLS.","archived":false,"fork":false,"pushed_at":"2022-07-02T22:14:02.000Z","size":838,"stargazers_count":220,"open_issues_count":0,"forks_count":13,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-09-28T09:04:07.877Z","etag":null,"topics":["asyncio","io-uring","ktls","python"],"latest_commit_sha":null,"homepage":"https://gitee.com/fantix/kloop","language":"Cython","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fantix.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}},"created_at":"2022-03-19T14:23:27.000Z","updated_at":"2025-09-04T15:22:01.000Z","dependencies_parsed_at":"2022-08-08T19:30:59.173Z","dependency_job_id":null,"html_url":"https://github.com/fantix/kloop","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fantix/kloop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantix%2Fkloop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantix%2Fkloop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantix%2Fkloop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantix%2Fkloop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fantix","download_url":"https://codeload.github.com/fantix/kloop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fantix%2Fkloop/sbom","scorecard":{"id":392599,"data":{"date":"2025-08-11","repo":{"name":"github.com/fantix/kloop","commit":"f055323af3c737e84bcc2b10335e283ff396175b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"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":"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":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":"Code-Review","score":0,"reason":"Found 0/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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.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":"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/build.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/fantix/kloop/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/fantix/kloop/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/fantix/kloop/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/fantix/kloop/build.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:19","Warn: pipCommand not pinned by hash: .github/workflows/build.yml:20","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand 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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":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":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: RUSTSEC-2024-0421 / GHSA-h97m-ww89-6jmq"],"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-18T18:11:00.713Z","repository_id":37266786,"created_at":"2025-08-18T18:11:00.713Z","updated_at":"2025-08-18T18:11:00.713Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279000702,"owners_count":26082805,"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-08T02:00:06.501Z","response_time":56,"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":["asyncio","io-uring","ktls","python"],"created_at":"2024-08-02T09:00:54.308Z","updated_at":"2025-10-08T19:07:29.048Z","avatar_url":"https://github.com/fantix.png","language":"Cython","funding_links":[],"categories":["Cython"],"sub_categories":[],"readme":"# \u003cimg src=\"docs/kloop@2x.png\" height=\"96px\" align=\"left\"\u003e  kLoop - *asyncio on Linux kernel*\n\n[![中文](https://img.shields.io/badge/Zh-中文-informational?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAQCAYAAAAWGF8bAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAFKADAAQAAAABAAAAEAAAAABHXVY9AAABc0lEQVQ4EaWSOy8EURTHd+wDEY94JVtgg9BI1B6dQqHiE1CrRasT30DpC2hVQimiFkJWVsSj2U1EsmQH4/ff3CO3WDuDk/zmf8/jnntm7qRSMRZFUQ4WYSimNFmaRlsgq8F83K6WuALyva4mixbc+kfJcGqa7CqU4AjaocNpG5oHsx7qB3EqQRC8K4g/gazAMbFTBdbgL1Zh0w2EbnMVHdMrd4LZNotZmIZJKMAemC2z0MS6oDlYhzOQ6c3yGR5Fec4OGPvEHCmn3np+kfyT51+QH8afcbFLTfjgFVS9tZrpwC4v1k9M39w3NTQrBxSM4127SAmNoBt0Ma3QyHRwGUIYdQUh0+c0wZsLPKKH8AwvoHgNlmABZLtwBdqnP0DD9IEG2If6N0oz5SbYSfW4PYhvgNmUxU1JZGEEAsUyjPmB7lhBA1Xe7NMWpuzXa39fnC7lN1b/mZttSNLQv9XXZs2US9LwzjU5R+/d+n/CBx9I2uELeXrRajeDqHwAAAAASUVORK5CYII=)](README.zh.md)\n[![build](https://img.shields.io/github/workflow/status/fantix/kloop/构建?label=build\u0026logo=github)](https://github.com/fantix/kloop/actions/workflows/build.yml)\n[![downloads](https://img.shields.io/pypi/dm/kloop?logo=pypi\u0026logoColor=white)](https://pypi.python.org/pypi/gino)\n[![code quality](https://img.shields.io/codacy/grade/f2e97d6eb2554e87b3cd15aae8f6b1e0?logo=codacy)](https://app.codacy.com/gh/fantix/kloop/dashboard)\n[![license](https://img.shields.io/badge/license-MulanPSL--2.0-success?logo=opensourceinitiative\u0026logoColor=white)](http://license.coscl.org.cn/MulanPSL2/)\n\nkLoop is an implementation of the Python\n[asyncio](https://docs.python.org/3/library/asyncio.html) event loop written\nin [Cython](https://cython.org/), using\n[io_uring](https://unixism.net/loti/what_is_io_uring.html) and\n[kTLS](https://www.kernel.org/doc/html/latest/networking/tls-offload.html)\nfeatures of the Linux kernel, therefore called k(ernel)Loop.\n\nkLoop is open-sourced and released under the\n[MulanPSL - 2.0 license](http://license.coscl.org.cn/MulanPSL2).\n\n**⚠️WARNING: THIS PROJECT IS IN PROOF-OF-CONCEPT STAGE!⚠️**\n\n\n## Features\n\n* **Minimum syscalls** - all I/O calls are done in the kernel thanks to\n  io_uring, and the only remaining syscall to `io_uring_enter()` is also\n  optimized to be only called when necessary using the `SQPOLL` feature. That\n  means most of the overhead of syscalls is gone;\n* **No GIL in the main-loop** - the hot-path is written in Cython without GIL,\n  that means it's compiled into pure C code without Python structures, saving\n  some memory and execution time. On the other hand, GIL is only taken before\n  Python callbacks, so it's slightly more friendly to multithreading, which is\n  still not recommended though.\n* **TLS offloading** - all symmetric-key encryption and decryption work is\n  offloaded to the NIC if supported, or to the thread pool of io_uring\n  otherwise. This allows us to free up CPU for more I/O, or leverage all the\n  CPU cores even if the application is running single-threaded.\n* **Asynchronous DNS resolving** - we blended in the Rust\n  [trust-dns](https://github.com/bluejekyll/trust-dns/) library with a custom\n  I/O runtime bridging to io_uring in C (including reading the\n  `/etc/resolv.conf` and `/etc/hosts` files), providing flexible APIs to manage\n  the concurrency, cache and configuration in Python.\n\n\n## Requirements\n\n* Python \u003e= 3.10\n* Linux \u003e= 5.11 (enable kTLS with `modprobe tls`)\n* OpenSSL \u003e= 3.0 (kTLS receive offloading on TLS 1.3 requires the latest\n  development version)\n\nDevelopment and testing is done on Ubuntu 22.04.\n\n\n## Architecture Diagram\n\n\u003cimg src=\"docs/architecture.en.png\" width=\"620px\" alt=\"architecture.png\"\u003e\n\nLooks like the Lucky Charms factory, says @aaronbrighton ...\n\n\n## Development\n\n### Ubuntu 22.04\n\n```bash\nsudo apt update\nsudo apt install gcc libssl-dev python3-dev python3.10-venv\ncurl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh\npython3 -m venv path/to/env\nsource path/to/env/bin/activate\npip install cython\nKLOOP_DEBUG=1 python setup.py develop  # or just run `make`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantix%2Fkloop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffantix%2Fkloop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffantix%2Fkloop/lists"}