Pat Hickey
f60ae73d15
Merge pull request #2832 from bytecodealliance/pch/wiggle_sync_shimming
...
wasi-common support for tokio, & wiggle support for async methods containing sync code
2021-05-07 17:43:42 -07:00
Dan Gohman
ec5d8016f7
On Windows, ignore files for which full_metadata fails.
...
On Windows, `metadata` computes only partial metadata results, which don't
include what WASI needs for the `inode` field in `readdir` results. cap-std
has a `full_metadata` function which is able to include this extra
information, however it has more strict access requirements, so it sometimes
fails even when plain `metadata` would succeed.
Make WASI's `readdir` silently skip over files that can't be accessed by
`full_metadata`. These files wouldn't be openable in any other way by
WASI programs, so the only benefit of listing them would be to
let applications know that they exist. This allows it to avoid failing
and avoid returning bogus results.
This is part of a fix for bytecodealliance/cap-std#169 .
2021-05-07 14:47:39 -07:00
Pat Hickey
f3ffd74566
dont depend on wiggle for just the one func
2021-05-06 11:19:25 -07:00
Pat Hickey
f76fe8b764
rewrite wasi-tokio as just an task::block_in_place wrapper on cap-std-sync
2021-05-04 14:15:50 -07:00
Pat Hickey
c0e89b8da8
wasi-cap-std-sync: WasiFile and WasiDir converted to async_traits
2021-04-14 15:43:19 -07:00
Pat Hickey
e2b67aa9a3
simplify life for readdir implementors
2021-02-03 18:04:26 -08:00
Pat Hickey
c8ca639b93
new cap-std apis fix some windows tests!
...
fix for fd_readdir test on linux, and symlink_create / nofollow_errors
2021-02-03 16:16:23 -08:00
Pat Hickey
b29a3bfbb2
fix warnings
2021-02-02 17:08:58 -08:00
Pat Hickey
186360fab2
delete temporary tests
2021-02-02 15:29:50 -08:00
Pat Hickey
a06b23a308
even simpler test case
2021-02-02 13:40:35 -08:00
Pat Hickey
330902f44e
add test for incredibly cursed windows rename behavior
2021-02-02 13:29:56 -08:00
Pat Hickey
dec0038ba0
add a readdir unit test to wasi-cap-std-sync
2021-02-01 19:40:24 -08:00
Pat Hickey
f48b45784e
remove dead comment
2021-02-01 18:36:49 -08:00
Pat Hickey
cde252c59b
wasi-cap-std-sync: sync family of flags is not supported on file_open
2021-02-01 14:25:32 -08:00
Pat Hickey
993697e221
set_fd_flags is only good for append and nonblock
2021-02-01 14:14:13 -08:00
Pat Hickey
a4372c8c2e
cap-std-sync: test opening a tempdir as ambient and then WasiDir
2021-02-01 13:15:39 -08:00
Pat Hickey
8b9d2c5bbb
cap-std-sync: my set_fd_flags idea didnt seem to work?
2021-02-01 12:42:31 -08:00
Pat Hickey
e9a7a4094c
cap-std-sync Dir::open_file: set the fdflags that OpenOptions cant
2021-01-29 21:08:53 -08:00
Pat Hickey
3d406ff50e
Dir::open_file can just pass read/write as bools, centralizing FileCaps decoding
...
this way the impls of File/Dir don't need to know about any caps!
2021-01-29 21:04:34 -08:00
Pat Hickey
9bd89abc0c
rename everything c2 related to the "real" names
2021-01-28 15:34:03 -08:00
Pat Hickey
47fec44c10
move wasi-c2 into wasi-common
2021-01-28 15:15:50 -08:00