Commit Graph

447 Commits

Author SHA1 Message Date
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
Pat Hickey
897b4fb8ab wasictxbuilder: assert that stdio is provided 2021-01-29 15:48:55 -08:00
Pat Hickey
b48e7fcc5d integrate with c-api 2021-01-29 14:09:44 -08:00
Pat Hickey
d3ba69d865 wasi-common no longer contains code derived from cloudabi-utils
the original C implementation was derived directly from cloudabi-utils.
that implementation is no longer in tree.

acfoltzer's initial Rust implementation included a path_open function
that was ported from cloudabi-utils. this rewrite of wasi-common has
completely delegated all path lookup functionality to cap-std (in the
cap-std-sync impls), and cap-std itself has a completely re-designed
method of path resolution.
2021-01-29 13:28:13 -08:00
Pat Hickey
11821e5bfd Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std 2021-01-29 12:38:13 -08:00
Pat Hickey
e498888732 hook run command up to both wasi snapshots
sharing the same context! at long last
2021-01-29 12:29:30 -08:00
Pat Hickey
d738a4a588 preview 0: copy bodies of read, write, and poll_oneoff from snapshot 1 2021-01-29 12:07:21 -08:00
Pat Hickey
ef2cb7b6b7 nearly have snapshot 0 implemented... 2021-01-28 17:00:31 -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
Pat Hickey
dd005208b6 delete wasi-common, yanix, winx 2021-01-28 15:13:45 -08:00
Pat Hickey
32f162aa78 fix windows flags 2021-01-12 09:51:09 -08:00
Pat Hickey
b53aecb367 Merge branch 'pch/wiggle_flags_bitflags' into pch/wasi_common_cap_std 2021-01-11 18:31:43 -08:00
Pat Hickey
75a9dc7fe2 wasi-common: wiggle flags are now bitflags!
this mostly mechanical change is just getting rid of passing to
`contains` by reference.
2021-01-11 18:27:55 -08:00
Pat Hickey
a900d0431d Merge remote-tracking branch 'origin/main' into pch/wasi_common_cap_std 2021-01-07 16:39:27 -08:00
Nick Fitzgerald
5de5bf1565 Merge pull request #2550 from bytecodealliance/pch/wiggle_trapping
wiggle: introduce Trap enum
2021-01-07 16:23:21 -08:00