{"id":34540943,"url":"https://github.com/utooland/tokio-fs-ext","last_synced_at":"2026-02-09T09:06:02.891Z","repository":{"id":307514618,"uuid":"1025915935","full_name":"utooland/tokio-fs-ext","owner":"utooland","description":"Extend tokio fs to be compatible with native and wasm","archived":false,"fork":false,"pushed_at":"2026-02-07T17:06:12.000Z","size":300,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-02-08T00:07:23.274Z","etag":null,"topics":["browserfs","filesystem","opfs","rust","tokio","wasm"],"latest_commit_sha":null,"homepage":"https://docs.rs/tokio-fs-ext","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/utooland.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-25T02:55:43.000Z","updated_at":"2026-02-07T17:06:16.000Z","dependencies_parsed_at":"2025-07-31T19:01:57.179Z","dependency_job_id":"e67fb2e1-075a-426e-a7cf-726cfec6d98e","html_url":"https://github.com/utooland/tokio-fs-ext","commit_stats":null,"previous_names":["xusd320/tokio-fs-ext","utooland/tokio-fs-ext"],"tags_count":32,"template":false,"template_full_name":null,"purl":"pkg:github/utooland/tokio-fs-ext","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utooland%2Ftokio-fs-ext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utooland%2Ftokio-fs-ext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utooland%2Ftokio-fs-ext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utooland%2Ftokio-fs-ext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/utooland","download_url":"https://codeload.github.com/utooland/tokio-fs-ext/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/utooland%2Ftokio-fs-ext/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29260426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-09T04:11:57.159Z","status":"ssl_error","status_checked_at":"2026-02-09T04:11:56.117Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["browserfs","filesystem","opfs","rust","tokio","wasm"],"created_at":"2025-12-24T06:16:35.882Z","updated_at":"2026-02-09T09:06:02.886Z","avatar_url":"https://github.com/utooland.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tokio-fs-ext\n\n[![Crates.io](https://img.shields.io/crates/v/tokio-fs-ext.svg)](https://crates.io/crates/tokio-fs-ext)\n[![Docs.rs](https://docs.rs/tokio-fs-ext/badge.svg)](https://docs.rs/tokio-fs-ext)\n\nTokio-fs-ext is a Rust library that provides a `tokio::fs` compatible API for both native and WebAssembly environments on web browsers.\n\n## Overview\n\nThe standard `tokio::fs` module in the Tokio runtime is a powerful tool for asynchronous file system operations. However, it relies on `syscalls` and I/O operations that are executed on a dedicated thread pool. This design is not suitable for WebAssembly environments where threading and direct file system access are restricted.\n\nThis library aims to bridge that gap by offering an API that is compatible with `tokio::fs` but works seamlessly in WebAssembly. It provides a consistent interface for file system operations, regardless of the target platform.\n\n## Features\n\n- A `tokio::fs`-like API.\n- Re-export `tokio::fs` on native platforms, and use implementations by [`OPFS`](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system) on `wasm32-unknown-unknown` platform.\n- Implemented [futures::io::traits](https://docs.rs/futures/0.3.31/futures/io/index.html#traits).\n- Asynchronous file operations for non-blocking applications.\n\n## Usage\n\n```rust\nuse tokio_fs_ext as fs;\nuse std::io;\nuse futures::io::AsyncReadExt;\n\nasync fn foo() -\u003e io::Result\u003c()\u003e {\n    fs::write(\"hello.txt\", \"Hello\").await?;\n\n    {\n        let mut file = fs::File::open(\"hello.txt\").await?;\n    \n        let mut vec = Vec::new();\n        file.read_to_end(\u0026mut vec).await?;\n    }\n\n    fs::remove_file(\"hello.txt\").await?;\n\n    Ok(())\n}\n```\n\n## Clarification\n\n- The implements for WebAssembly can only be used in [`DedicatedWorkerGlobalScope`](https://developer.mozilla.org/en-US/docs/Web/API/DedicatedWorkerGlobalScope).\n\n## Contributing\n\n## Testing\n\n```bash\n# test native\ncargo test\n\n# test wasm\nbrew install --cask chromedriver\ncargo test --target wasm32-unknown-unknown\n\n# test wasm in interactive mode\nbrew install wasm-pack\nwasm-pack test --chrome\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futooland%2Ftokio-fs-ext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Futooland%2Ftokio-fs-ext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Futooland%2Ftokio-fs-ext/lists"}