{"id":17219317,"url":"https://github.com/andreafioraldi/klo-routines","last_synced_at":"2025-04-13T23:41:02.914Z","repository":{"id":48643082,"uuid":"386333644","full_name":"andreafioraldi/klo-routines","owner":"andreafioraldi","description":"Rust cheap coroutines with libc::*context","archived":false,"fork":false,"pushed_at":"2021-07-16T07:27:29.000Z","size":9,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T13:51:12.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/andreafioraldi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-15T15:13:47.000Z","updated_at":"2021-10-30T15:17:59.000Z","dependencies_parsed_at":"2022-08-30T02:02:46.156Z","dependency_job_id":null,"html_url":"https://github.com/andreafioraldi/klo-routines","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fklo-routines","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fklo-routines/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fklo-routines/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreafioraldi%2Fklo-routines/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreafioraldi","download_url":"https://codeload.github.com/andreafioraldi/klo-routines/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248799282,"owners_count":21163397,"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","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":[],"created_at":"2024-10-15T03:49:37.194Z","updated_at":"2025-04-13T23:41:02.879Z","avatar_url":"https://github.com/andreafioraldi.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# klo-routines\n\nRust cheap coroutines with libc::*context\n\n## Example\n\n```rust\nuse klo_routines::{flush, KloRoutine};\n\nfn main() {\n    let mut cnt = 0;\n    let mut func = || {\n        for _ in 0..16 {\n            flush(cnt);\n            cnt += 1;\n        }\n    };\n\n    let mut klo = KloRoutine::new(\u0026mut func);\n    while let Some(n) = klo.resume() {\n        println!(\"{}\", n);\n    }\n    \n    // or you can use it as iterator\n    // for n in \u0026mut klo {\n    //     println!(\"{}\", n);\n    // }\n}\n```\n\n#### License\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreafioraldi%2Fklo-routines","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreafioraldi%2Fklo-routines","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreafioraldi%2Fklo-routines/lists"}