Skip to content

Commit 60b6181

Browse files
committed
Mention Android's file descriptor ownership APIs in Prior Art.
1 parent aa509de commit 60b6181

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

text/0000-io-safety.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,14 @@ share the same basic concepts that io-lifetimes uses. All are built around
325325
Rust's lifetime and ownership concepts, and confirm that these concepts
326326
are a good fit for this problem.
327327

328+
Android has special APIs for detecting improper `close`s; see
329+
rust-lang/rust#74860 for details. The motivation for these APIs also applies
330+
to I/O safety here. Android's special APIs use dynamic checks, which enable
331+
them to enforce rules across source language boundaries. The I/O safety
332+
types and traits proposed here are only aiming to enforce rules within Rust
333+
code, so they're able to use Rust's type system to enforce rules at
334+
compile time rather than run time.
335+
328336
[io-lifetimes README.md's Prior Art section]: https://github.com/sunfishcode/io-lifetimes#prior-art
329337
[C#]: https://docs.microsoft.com/en-us/dotnet/api/system.io.file?view=net-5.0
330338
[Java]: https://docs.oracle.com/javase/7/docs/api/java/io/File.html?is-external=true

0 commit comments

Comments
 (0)