Skip to content

Release v1.0.2: fix WASI no-default build, MSRV CI, repo rename#50

Merged
al8n merged 4 commits intomainfrom
1.0.2
Apr 23, 2026
Merged

Release v1.0.2: fix WASI no-default build, MSRV CI, repo rename#50
al8n merged 4 commits intomainfrom
1.0.2

Conversation

@al8n
Copy link
Copy Markdown
Owner

@al8n al8n commented Apr 23, 2026

Summary

  • P2 WASI --no-default-features build: the stats API and feature re-exports now gate on cfg(any(unix, windows)) so wasm32-wasip1 compiles (rustix does not expose statvfs/flock/fallocate there); on WASI the crate reduces to FsStats + TryLockError.
  • P2 async-feature MSRV drift in CI: minrust now runs cargo hack check --each-feature at 1.75.0 (skipping async-std/smol, which documented MSRV is higher), and a new minrust-async job pins 1.85.0 to catch future drift in async-std/smol transitive deps.
  • P3 AsFd / AsHandle cleanup (declined): async_std::fs::File, smol::fs::File, and both fs_err{2,3}::tokio::File wrappers only expose AsRawFd/AsRawHandle upstream. Splitting the macros into safe/raw variants would be churn without soundness benefit (reviewer already noted the existing lifetimes are fine). Added explanatory comments in src/unix.rs, src/unix/{sync,async}_impl.rs, and src/windows.rs so this isn't re-opened.
  • Crate-level allow(unused_macros) so cargo clippy --no-default-features no longer errors on the feature-gated cfg_*! macros.
  • Repo rename: github.com/al8n/fs4-rsgithub.com/al8n/fs4 (Cargo.toml repository, README badges/links).
  • Bump version to 1.0.2.

Test plan

  • cargo test --all-features -- --test-threads 1 (90 passed)
  • cargo clippy --all-features -- -Dwarnings
  • cargo clippy --no-default-features -- -Dwarnings (reproduced reported failure, now green)
  • cargo clippy --no-default-features --features <each> for sync / async-std / tokio / smol / fs-err2 / fs-err3 / fs-err2-tokio / fs-err3-tokio
  • cargo check --target wasm32-wasip1 --no-default-features (previously failed to compile)
  • cargo check --target wasm32-wasip1 --no-default-features --features sync | fs-err2 | fs-err3
  • cargo fmt --all -- --check
  • CI: verify new minrust (1.75.0, cargo-hack --skip async-std,smol) and minrust-async (1.85.0) jobs both pass

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.27%. Comparing base (f5e148e) to head (ed3212b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #50   +/-   ##
=======================================
  Coverage   98.27%   98.27%           
=======================================
  Files          11       11           
  Lines         753      755    +2     
=======================================
+ Hits          740      742    +2     
  Misses         13       13           
Files with missing lines Coverage Δ
src/lib.rs 100.00% <ø> (ø)
src/unix.rs 100.00% <ø> (ø)
src/unix/async_impl.rs 100.00% <ø> (ø)
src/unix/sync_impl.rs 100.00% <ø> (ø)
src/windows.rs 90.90% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5e148e...ed3212b. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refines platform/MSRV handling for fs4 by (1) clarifying and centralizing the rationale for raw-handle/raw-fd usage at FFI boundaries, (2) tightening cfg gating so non-Unix/Windows targets can compile without the OS-backed extension APIs, and (3) strengthening CI’s MSRV coverage across feature flags.

Changes:

  • Document and standardize the “single code path via AsRaw* + Borrowed*::borrow_raw” approach for supported file wrapper types.
  • Gate file_ext + filesystem stat APIs to cfg(any(unix, windows)) so unsupported targets build without those backends.
  • Update CI MSRV checking to validate feature-gated code paths via cargo hack, with a separate MSRV track for async-std/smol.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/windows.rs Adds rationale for using AsRawHandle at the FFI boundary to support multiple file wrapper types.
src/unix.rs Documents why BorrowedFd::borrow_raw is used to keep one implementation across file types.
src/unix/sync_impl.rs Adds cross-reference comment explaining BorrowedFd::borrow_raw choice in allocation path.
src/unix/async_impl.rs Adds cross-reference comment explaining BorrowedFd::borrow_raw choice in allocation path.
src/lib.rs Gates backend-dependent modules/APIs to Unix/Windows so non-backend targets can still compile.
.github/workflows/ci.yml Expands MSRV checks to --each-feature and adds a separate MSRV job for async runtimes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs Outdated
Comment thread .github/workflows/ci.yml
@al8n al8n changed the title 1.0.2 Release v1.0.2: fix WASI no-default build, MSRV CI, repo rename Apr 23, 2026
@al8n al8n merged commit 16bab4b into main Apr 23, 2026
29 checks passed
@al8n al8n deleted the 1.0.2 branch April 23, 2026 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants