Skip to content

Commit df559d9

Browse files
committed
Minimal optimization for cap-async-std.
Use `spawn_blocking` to run important blocking tests off the main thread.
1 parent 0d91d2e commit df559d9

File tree

14 files changed

+1066
-405
lines changed

14 files changed

+1066
-405
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ publish = false
1717
rustc_version = "0.4.0"
1818

1919
[dev-dependencies]
20-
async-std = { version = "1.9.0", features = ["attributes"] }
20+
async-std = { version = "1.10.0", features = ["attributes"] }
2121
anyhow = "1.0.37"
2222
cap-async-std = { path = "cap-async-std", version = "^0.17.1-alpha.0"}
2323
cap-fs-ext = { path = "cap-fs-ext", version = "^0.17.1-alpha.0"}

cap-async-std/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ edition = "2018"
1414

1515
[dependencies]
1616
arf-strings = { version = "0.4.0", optional = true }
17-
async-std = { version = "1.9.0", features = ["attributes"] }
17+
# Enable "unstable" for `spawn_blocking`.
18+
async-std = { version = "1.10.0", features = ["attributes", "unstable"] }
1819
cap-primitives = { path = "../cap-primitives", version = "^0.17.1-alpha.0"}
1920
io-lifetimes = { version = "0.3.0", default-features = false, features = ["async-std"] }
2021
ipnet = "2.3.0"

cap-async-std/README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,5 @@
1515
This crate provides a capability-based version of [`async-std`]. See the
1616
[toplevel README.md] for more information about capability-based security.
1717

18-
At the moment, `cap-async-std` is a very rudimentary translation of [`cap-std`] to
19-
`async-std`. It hasn't yet been optimized to make effective use of `async`.
20-
2118
[`async-std`]: https://crates.io/crates/async-std
22-
[`cap-std`]: https://github.com/bytecodealliance/cap-std/blob/main/cap-std/README.md
2319
[toplevel README.md]: https://github.com/bytecodealliance/cap-std/blob/main/README.md

0 commit comments

Comments
 (0)