{"id":31978559,"url":"https://github.com/deinstapel/cursive-async-view","last_synced_at":"2025-10-14T22:23:00.343Z","repository":{"id":44959887,"uuid":"195809186","full_name":"deinstapel/cursive-async-view","owner":"deinstapel","description":"A loading-screen wrapper for gyscos/cursive views 🖥️","archived":false,"fork":false,"pushed_at":"2024-08-12T16:43:30.000Z","size":1228,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-21T03:44:43.024Z","etag":null,"topics":["async","cursive","cursive-views","loading","progress","terminal"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deinstapel.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["fin-ger","jwuensche"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2019-07-08T12:39:00.000Z","updated_at":"2025-09-10T10:32:54.000Z","dependencies_parsed_at":"2022-08-27T00:43:07.595Z","dependency_job_id":null,"html_url":"https://github.com/deinstapel/cursive-async-view","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/deinstapel/cursive-async-view","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deinstapel%2Fcursive-async-view","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deinstapel%2Fcursive-async-view/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deinstapel%2Fcursive-async-view/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deinstapel%2Fcursive-async-view/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deinstapel","download_url":"https://codeload.github.com/deinstapel/cursive-async-view/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deinstapel%2Fcursive-async-view/sbom","scorecard":{"id":332735,"data":{"date":"2025-08-11","repo":{"name":"github.com/deinstapel/cursive-async-view","commit":"a4d79f99364586ee3aad174f3e131ddb3b350174"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":1,"reason":"Found 3/25 approved changesets -- score normalized to 1","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":"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":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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test_and_push.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: downloadThenRun not pinned by hash: .github/workflows/test_and_push.yml:18","Info:   0 out of   1 downloadThenRun 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":"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":"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":"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":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: BSD 3-Clause \"New\" or \"Revised\" License: 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":"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":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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 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-18T03:58:29.425Z","repository_id":44959887,"created_at":"2025-08-18T03:58:29.425Z","updated_at":"2025-08-18T03:58:29.425Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279021779,"owners_count":26087055,"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-14T02:00:06.444Z","response_time":60,"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":["async","cursive","cursive-views","loading","progress","terminal"],"created_at":"2025-10-14T22:22:55.983Z","updated_at":"2025-10-14T22:23:00.330Z","avatar_url":"https://github.com/deinstapel.png","language":"Rust","readme":"\u003ch1 align=\"center\"\u003eWelcome to cursive-async-view 👋\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/deinstapel/cursive-async-view/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fstable-build.json\" alt=\"stable build\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/deinstapel/cursive-async-view/actions\"\u003e\n    \u003cimg src=\"https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fnightly-build.json\" alt=\"nightly build\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://crates.io/crates/cursive-async-view\"\u003e\n    \u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/cursive-async-view.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://docs.rs/cursive-async-view\"\u003e\n    \u003cimg alt=\"Docs.rs\" src=\"https://docs.rs/cursive-async-view/badge.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/deinstapel/cursive-async-view/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"GitHub\" src=\"https://img.shields.io/github/license/deinstapel/cursive-async-view.svg\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://spacemacs.org\"\u003e\n    \u003cimg src=\"https://cdn.rawgit.com/syl20bnr/spacemacs/442d025779da2f62fc86c2082703697714db6514/assets/spacemacs-badge.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"http://makeapullrequest.com\"\u003e\n    \u003cimg alt=\"PRs Welcome\" src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  \u003ci\u003eA loading-screen wrapper for\n  \u003ca href=\"https://github.com/gyscos/cursive\"\u003egyscos/cursive\u003c/a\u003e\n  views\u003c/i\u003e\n\u003c/p\u003e\n\n---\n\nThis project provides a wrapper view with a loading screen for [gyscos/cursive](https://github.com/gyscos/cursive) views. The loading screen will disappear once the wrapped view is fully loaded. This is useful for displaying views which may take long to construct or depend on e.g. the network.\n\n## How does it look like? `demo` [![terminalizer](https://img.shields.io/badge/GIF-terminalizer-blueviolet.svg)](https://github.com/faressoft/terminalizer)\n\n\u003cdetails\u003e\n  \u003csummary\u003eExpand to view\u003c/summary\u003e\n  \u003cimg src=\"assets/async-view-simple.gif\" alt=\"async-view-simple demo\" width=\"430\"\u003e\n  \u003cimg src=\"assets/async-view-progress.gif\" alt=\"async-view-progress demo\" width=\"430\"\u003e\n  \u003cimg src=\"assets/async-view-timeout.gif\" alt=\"async-view-timeout demo\" width=\"430\"\u003e\n  \u003cimg src=\"assets/async-view-progress-fail.gif\" alt=\"async-view-progress-fail demo\" width=\"430\"\u003e\n\u003c/details\u003e\n\n## Usage\n\nSimply add to your `Cargo.toml`\n\n```toml\n[dependencies]\ncursive-async-view = \"^0\"\n```\n\n### Asynchronous view loading without progress information\n\nIf you can't tell the progress during a long taking preparation of data for\na view, you may wrap the creation of this view in an `AsyncView`. This will\ndisplay a loading animation until the inner view is ready to be drawn.\n\n```rust\nuse std::time::{Instant, Duration};\nuse cursive::{views::TextView, Cursive, CursiveExt};\nuse cursive_async_view::{AsyncView, AsyncState};\n\nlet mut siv = Cursive::default();\nlet instant = Instant::now();\nlet async_view = AsyncView::new(\u0026mut siv, move || {\n    if instant.elapsed() \u003e Duration::from_secs(10) {\n        AsyncState::Available(\n            TextView::new(\"Yay!\\n\\nThe content has loaded!\")\n        )\n    } else {\n        AsyncState::Pending\n    }\n});\n\nsiv.add_layer(async_view);\n// siv.run();\n```\n\nRefer to the `AsyncView` struct level documentation for a detailed\nexplanation or to the `simple` example located in the source code\nrepository.\n\nIf you need to do a blocking operation during the construction of the child\nview, you may have a look at the alternate `new_with_bg_task` constructor.\n\n```rust\nuse std::thread;\nuse std::time::Duration;\n\nuse cursive::views::TextView;\nuse cursive::{Cursive, CursiveExt};\nuse cursive_async_view::AsyncView;\n\nlet mut siv = Cursive::default();\nlet async_view = AsyncView::new_with_bg_creator(\u0026mut siv, move || {\n    // this function is executed in a background thread, so we can block\n    // here as long as we like\n    thread::sleep(Duration::from_secs(10));\n\n    // enough blocking, let's show the content\n    Ok(\"Yeet! It worked 🖖\")\n}, TextView::new); // create a text view from the string\n\nsiv.add_layer(async_view);\n// siv.run();\n```\n\nRefer to the `AsyncView` struct level documentation for a detailed\nexplanation or to the `bg_task` example located in the source code\nrepository.\n\n### Asynchronous view loading with a progress bar\n\nIf you have information about the progress a long taking view creation has made,\nyou can wrap the creation in an `AsyncProgressView`. This will display a progress\nbar until the inner view is ready to be drawn.\n\n```rust\nuse cursive::{views::TextView, Cursive, CursiveExt};\nuse cursive_async_view::{AsyncProgressView, AsyncProgressState};\n\nlet mut siv = Cursive::default();\nlet start = std::time::Instant::now();\nlet async_view = AsyncProgressView::new(\u0026mut siv, move || {\n    if start.elapsed().as_secs() \u003c 3 {\n        AsyncProgressState::Pending(start.elapsed().as_secs() as f32 / 3f32)\n    } else {\n        AsyncProgressState::Available(TextView::new(\"Finally it loaded!\"))\n    }\n});\n\nsiv.add_layer(async_view);\n// siv.run();\n```\n\n## Changelog\n\nThe changelog is located in a [separate file](./CHANGELOG.md) and contains changes and migration hints for upcoming versions.\n\n## Troubleshooting\n\nIf you find any bugs/unexpected behaviour or you have a proposition for future changes open an issue describing the current behaviour and what you expected.\n\n## Development [![cargo test](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fdeinstapel.github.io%2Fcursive-async-view%2Fcargo-test.json)](https://github.com/deinstapel/cursive-async-view/actions)\n\n\u003e TBD\n\n### Running the tests\n\nJust run\n\n```plain\n$ cargo test\n```\n\nto execute all available tests.\n\n#### shields.io endpoints\n\n[shields.io](https://shields.io) endpoints are generated inside the `./target/shields` folder. They are used in this README.\n\n## Authors\n\n**Fin Christensen**\n\n\u003e [:octocat: `@fin-ger`](https://github.com/fin-ger)  \n\u003e [:elephant: `@fin_ger@weirder.earth`](https://weirder.earth/@fin_ger)  \n\u003e [:bird: `@fin_ger_github`](https://twitter.com/fin_ger_github)  \n\n\u003cbr\u003e\n\n**Johannes Wünsche**\n\n\u003e [:octocat: `@jwuensche`](https://github.com/jwuensche)  \n\u003e [:elephant: `@fredowald@mastodon.social`](https://mastodon.social/web/accounts/843376)  \n\u003e [:bird: `@Fredowald`](https://twitter.com/fredowald)  \n\n## Show your support\n\nGive a :star: if this project helped you!\n","funding_links":["https://github.com/sponsors/fin-ger","https://github.com/sponsors/jwuensche"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeinstapel%2Fcursive-async-view","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeinstapel%2Fcursive-async-view","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeinstapel%2Fcursive-async-view/lists"}