Alex Crichton
d095f63cfd
Update submodules
2021-02-18 14:45:20 -08:00
Alex Crichton
26e9ea433e
Fix a bug in wasi
2021-02-18 14:45:20 -08:00
Alex Crichton
fa98f0bc91
Fix wiggle tests
2021-02-18 14:45:20 -08:00
Alex Crichton
df9c725fa0
Update to the next version of the witx crate
...
This commit updates to the 0.9 version of the witx crate implemented in
WebAssembly/wasi#395 . This new version drastically changes code
generation and how we interface with the crate. The intention is to
abstract the code generation aspects and allow code generators to
implement much more low-level instructions to enable more flexible APIs
in the future. Additionally a bunch of `*.witx` files were updated in
the WASI repository.
It's worth pointing out, however, that `wasi-common` does not change as
a result of this change. The shape of the APIs that we need to implement
are effectively the same and the only difference is that the shim
functions generated by wiggle are a bit different.
2021-02-18 14:45:20 -08:00
Dan Gohman
8d90ea0390
Bump version to 0.23.0
...
I used a specially modified version of the publish script to avoid
bumping the `witx` version.
2021-02-17 15:35:43 -08:00
Pat Hickey
c9d8ed03c9
wasi-common: fix fdstat of dirfd
...
the fdstat of a dirfd needs to include both the file and dir rights in
the inheriting field.
The wasi-libc path_open bases the base rights of child directories off
the inheriting rights of the parent, so if we only put file rights in
there, opening a child directory will not have any directory operations
permitted.
Fixes https://github.com/bytecodealliance/wasmtime/issues/2638
2021-02-10 16:53:39 -08:00
Pat Hickey
e4ce04bab4
WasiCtx: default to empty/sink stdio files rather than throw
...
the test harness now uses the empty stdin file. I tested manually that
the sink stdout & stderr files work, but theres no test in tree at the
moment
2021-02-05 17:50:20 -08:00
Pat Hickey
c535b94c73
theres the bug
2021-02-04 15:38:02 -08:00
Pat Hickey
4681e18ee0
will this fix it?
2021-02-04 14:58:44 -08:00
Pat Hickey
5ff9578b5c
wasi-common: WASI/phases is included in the package
2021-02-04 10:37:45 -08: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
e670c46862
system-interface 0.6
2021-02-03 16:07:05 -08:00
Pat Hickey
1a45096ee6
wasi-common, wasi-cap-std-sync, wasmtime-wasi should all be published now
2021-02-03 15:52:26 -08:00
Pat Hickey
bc1992b9a8
cap-std 0.13
2021-02-03 15:46:03 -08:00
Pat Hickey
31145060b2
remove virtfs - it is not suitable for use
2021-02-03 15:04:02 -08:00
Pat Hickey
d62b0a1f97
table keys can wrap around
2021-02-03 11:09:05 -08:00
Pat Hickey
b29a3bfbb2
fix warnings
2021-02-02 17:08:58 -08:00
Pat Hickey
857ef411b5
upstream fixes are pending for symlink_create & nofollow_errors on windows
2021-02-02 16:23:57 -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
a29b5bdcc8
dep to latest, lockfile already has it
2021-02-01 18:36:41 -08:00
Pat Hickey
58aa98ac8e
cap-std-sync docs
2021-02-01 18:07:05 -08:00
Pat Hickey
7daa7763e0
rustdoc the errors
2021-02-01 18:04:49 -08:00
Pat Hickey
0ef691b74e
rustdocs!!
2021-02-01 18:01:47 -08:00
Pat Hickey
e511dac9ec
rustdoc the table
2021-02-01 17:56:20 -08:00
Pat Hickey
7919b191ed
fix tests and exports
2021-02-01 17:06:00 -08:00
Pat Hickey
f17bff5490
fill in Deterministic impl of RngCore
2021-02-01 16:25:38 -08:00
Pat Hickey
e9ad3611f6
get rid of outdated cfg_attr
2021-02-01 16:16:13 -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
5ee093e774
Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std
2021-02-01 13:21:25 -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
Peter Huene
4632228b35
Fix fd_readdir to properly truncate directory entry names.
...
Previously, `fd_readdir` was truncating directory entry names based on the
calculation of `min(name_len, buf_len - bufused)`, but `bufused` was not being
updated after writing in the `dirent` structure to the buffer.
This allowed `bufused` to be incremented beyond `buf_len` and returned as the
number of bytes written to the buffer, which is invalid.
This fix adjusts `bufused` when the buffer is written to for the `dirent` so
that name truncation happens as expected.
Fixes #2618 .
2021-02-01 11:41:12 -08:00
Pat Hickey
bad169dde3
port https://github.com/bytecodealliance/wasmtime/pull/2620 into rewrite
2021-02-01 11:10:26 -08:00
Pat Hickey
133344e880
woo it passes six tests even though its awful
2021-01-30 13:54:34 -08:00
Pat Hickey
91a311e37e
delete
2021-01-30 13:44:54 -08:00
Pat Hickey
533db3e807
virtfs: implement a bunch more
2021-01-30 13:39:03 -08:00
Pat Hickey
b6cd7d84ad
cap-std-sync: export ctx components
2021-01-30 13:38:44 -08:00
Pat Hickey
e940d31f95
add a noent / not_found errorkind
2021-01-30 13:36:41 -08:00
Pat Hickey
c12cd82fc0
careful now
2021-01-29 21:19:24 -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
d8f3a62b32
dont try to make a virtfs today. instead, delete virtfs example.
2021-01-29 17:27:05 -08:00
Pat Hickey
95ad13c82d
wasi-common: break dep on system-interface by defining our own Advice enum
2021-01-29 17:03:08 -08:00
Pat Hickey
2e10e621c4
stub virtfs
2021-01-29 17:02:57 -08:00