{"id":13721270,"url":"https://github.com/status-im/nim-chronos","last_synced_at":"2026-03-16T20:38:02.460Z","repository":{"id":37742821,"uuid":"133633453","full_name":"status-im/nim-chronos","owner":"status-im","description":"Chronos - An efficient library for asynchronous programming","archived":false,"fork":false,"pushed_at":"2025-02-06T15:25:07.000Z","size":14526,"stargazers_count":369,"open_issues_count":56,"forks_count":53,"subscribers_count":66,"default_branch":"master","last_synced_at":"2025-02-22T17:43:32.547Z","etag":null,"topics":["async","async-await","asynchronous-programming","nim","nim-language"],"latest_commit_sha":null,"homepage":"https://status-im.github.io/nim-chronos/","language":"Nim","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/status-im.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHEv2","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":"2018-05-16T08:18:43.000Z","updated_at":"2025-02-09T17:47:27.000Z","dependencies_parsed_at":"2024-03-18T12:48:26.618Z","dependency_job_id":"007a603c-e9e1-4baf-95fa-57b90d2a006d","html_url":"https://github.com/status-im/nim-chronos","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fnim-chronos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fnim-chronos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fnim-chronos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/status-im%2Fnim-chronos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/status-im","download_url":"https://codeload.github.com/status-im/nim-chronos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240371761,"owners_count":19790888,"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":["async","async-await","asynchronous-programming","nim","nim-language"],"created_at":"2024-08-03T01:01:14.801Z","updated_at":"2026-03-16T20:38:02.430Z","avatar_url":"https://github.com/status-im.png","language":"Nim","funding_links":[],"categories":["Async processing","Language Features","Web 3.0","Nim"],"sub_categories":["Async IO"],"readme":"# Chronos - An efficient library for asynchronous programming\n\n[![Github action](https://github.com/status-im/nim-chronos/workflows/CI/badge.svg)](https://github.com/status-im/nim-chronos/actions/workflows/ci.yml)\n[![License: Apache](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n![Stability: experimental](https://img.shields.io/badge/stability-experimental-orange.svg)\n\n## Introduction\n\nChronos is an efficient [async/await](https://en.wikipedia.org/wiki/Async/await) framework for Nim. Features include:\n\n* Asynchronous socket and process I/O\n* HTTP server with SSL/TLS support out of the box (no OpenSSL needed)\n* Synchronization primitivies like queues, events and locks\n* Cancellation\n* Efficient dispatch pipeline with excellent multi-platform support\n* Exceptional error handling features, including `raises` tracking\n\n## Getting started\n\nInstall `chronos` using `nimble`:\n\n```text\nnimble install chronos\n```\n\nor add a dependency to your `.nimble` file:\n\n```text\nrequires \"chronos\"\n```\n\nand start using it:\n\n```nim\nimport chronos/apps/http/httpclient\n\nproc retrievePage(uri: string): Future[string] {.async.} =\n  # Create a new HTTP session\n  let httpSession = HttpSessionRef.new()\n  try:\n    # Fetch page contents\n    let resp = await httpSession.fetch(parseUri(uri))\n    # Convert response to a string, assuming its encoding matches the terminal!\n    bytesToString(resp.data)\n  finally: # Close the session\n    await noCancel(httpSession.closeWait())\n\necho waitFor retrievePage(\n  \"https://raw.githubusercontent.com/status-im/nim-chronos/master/README.md\")\n```\n\n## Documentation\n\nSee the [user guide](https://status-im.github.io/nim-chronos/).\n\n## Projects using `chronos`\n\n* [libp2p](https://github.com/status-im/nim-libp2p) - Peer-to-Peer networking stack implemented in many languages\n* [presto](https://github.com/status-im/nim-presto) - REST API framework\n* [Scorper](https://github.com/bung87/scorper) - Web framework\n* [2DeFi](https://github.com/gogolxdong/2DeFi) - Decentralised file system\n* [websock](https://github.com/status-im/nim-websock/) - WebSocket library with lots of features\n\n`chronos` is available in the [Nim Playground](https://play.nim-lang.org/#ix=2TpS)\n\nSubmit a PR to add yours!\n\n## TODO\n  * Multithreading Stream/Datagram servers\n\n## Contributing\n\nWhen submitting pull requests, please add test cases for any new features or fixes and make sure `nimble test` is still able to execute the entire test suite successfully.\n\n`chronos` follows the [Status Nim Style Guide](https://status-im.github.io/nim-style-guide/).\n\n## License\n\nLicensed and distributed under either of\n\n* MIT license: [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT\n\nor\n\n* Apache License, Version 2.0, ([LICENSE-APACHEv2](LICENSE-APACHEv2) or http://www.apache.org/licenses/LICENSE-2.0)\n\nat your option. These files may not be copied, modified, or distributed except according to those terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Fnim-chronos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstatus-im%2Fnim-chronos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstatus-im%2Fnim-chronos/lists"}