{"id":14992002,"url":"https://github.com/smol-rs/async-process","last_synced_at":"2025-04-14T00:51:41.821Z","repository":{"id":43698547,"uuid":"288556132","full_name":"smol-rs/async-process","owner":"smol-rs","description":"Async interface for working with processes","archived":false,"fork":false,"pushed_at":"2025-03-10T01:47:21.000Z","size":109,"stargazers_count":191,"open_issues_count":9,"forks_count":29,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-06T22:01:29.539Z","etag":null,"topics":["async","rust"],"latest_commit_sha":null,"homepage":"","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/smol-rs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-08-18T20:18:53.000Z","updated_at":"2025-04-05T06:41:59.000Z","dependencies_parsed_at":"2023-02-04T09:55:12.913Z","dependency_job_id":"dfac7551-aa67-4f16-a50f-8c003a049ab7","html_url":"https://github.com/smol-rs/async-process","commit_stats":{"total_commits":109,"total_committers":17,"mean_commits":6.411764705882353,"dds":0.6238532110091743,"last_synced_commit":"606d5969e6b0ea24352fc7dfa2b8c558390e54ba"},"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/smol-rs%2Fasync-process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/smol-rs","download_url":"https://codeload.github.com/smol-rs/async-process/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248402262,"owners_count":21097328,"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","rust"],"created_at":"2024-09-24T15:00:38.657Z","updated_at":"2025-04-14T00:51:41.802Z","avatar_url":"https://github.com/smol-rs.png","language":"Rust","funding_links":[],"categories":["Parallel and Async Library"],"sub_categories":[],"readme":"# async-process\n\n[![Build](https://github.com/smol-rs/async-process/workflows/Build%20and%20test/badge.svg)](\nhttps://github.com/smol-rs/async-process/actions)\n[![License](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)](\nhttps://github.com/smol-rs/async-process)\n[![Cargo](https://img.shields.io/crates/v/async-process.svg)](\nhttps://crates.io/crates/async-process)\n[![Documentation](https://docs.rs/async-process/badge.svg)](\nhttps://docs.rs/async-process)\n\nAsync interface for working with processes.\n\nThis crate is an async version of `std::process`.\n\n## Implementation\n\nA background thread named \"async-process\" is lazily created on first use, which waits for\nspawned child processes to exit and then calls the `wait()` syscall to clean up the \"zombie\"\nprocesses. This is unlike the `process` API in the standard library, where dropping a running\n`Child` leaks its resources.\n\nThis crate uses [`async-io`] for async I/O on Unix-like systems and [`blocking`] for async I/O\non Windows.\n\n[`async-io`]: https://docs.rs/async-io\n[`blocking`]: https://docs.rs/blocking\n\n## Examples\n\nSpawn a process and collect its output:\n\n```rust\nuse async_process::Command;\n\nlet out = Command::new(\"echo\").arg(\"hello\").arg(\"world\").output().await?;\nassert_eq!(out.stdout, b\"hello world\\n\");\n```\n\nRead the output line-by-line as it gets produced:\n\n```rust\nuse async_process::{Command, Stdio};\nuse futures_lite::{io::BufReader, prelude::*};\n\nlet mut child = Command::new(\"find\")\n    .arg(\".\")\n    .stdout(Stdio::piped())\n    .spawn()?;\n\nlet mut lines = BufReader::new(child.stdout.take().unwrap()).lines();\n\nwhile let Some(line) = lines.next().await {\n    println!(\"{}\", line?);\n}\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n#### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fasync-process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmol-rs%2Fasync-process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmol-rs%2Fasync-process/lists"}