Commit Graph

44 Commits

Author SHA1 Message Date
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
5ab8346a05 fix windows sync scheduler 2021-05-03 12:23:24 -07:00
Pat Hickey
7f34ccb909 various fixes to the design of Poll 2021-04-30 15:38:18 -07:00
Pat Hickey
b7efcbe80f jump through enough hoops for the poll lifetime to work out
you program rust for a few years and you think you're done tearing your
hair out over lifetimes, well, you'll find yourself wrong
2021-04-29 16:50:22 -07:00
Pat Hickey
b3e1ab4553 restructure Poll to hold a Table and fd instead of a RefMut<dyn WasiFile>
unfortunately, the borrow checker defeated me: changing the
RwSubscription file form a Ref to a RefMut turned into borrow checker
errors in the impl of the poll_oneoff trait method.

This implementation makes an end run by having Poll hold onto the table
and fd, and borrow the file at the site of use, rather than try to own
the RefMut. I have no idea why this convinces the borrow checker that
anything is different, but it does and I need to get this PR done and
I don't think comprimising on this internal abstraction is worth
fighting against
2021-04-28 11:56:48 -07:00
Pat Hickey
b307dce2ab add readable and writable futures to WasiFile trait 2021-04-26 14:43:16 -07:00
Pat Hickey
7202494e9d fix windows sched 2021-04-14 16:17:21 -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
22d18ffb0d cap-std-sync: async-trait e-paperwork 2021-04-13 17:51:18 -07:00
Chris Fallin
6bec13da04 Bump versions: Wasmtime to 0.26.0, Cranelift to 0.73.0. 2021-04-05 10:48:42 -07:00
Pat Hickey
07245a8763 wasi-cap-std-sync: re-export Dir while we're at it 2021-03-25 17:05:02 -07:00
Pat Hickey
81dfb9c458 wasi: make WasiSched::sleep fallible
some systems do not support sleeping and may want to return EINVAL here.
2021-03-23 10:20:03 -07:00
Dan Gohman
2880dab8f8 Add a sleep function to the WasiSched trait. 2021-03-22 12:50:16 -07:00
Nick Fitzgerald
d081ef9c2e Bump Wasmtime to 0.25.0; Cranelift to 0.72.0 2021-03-16 11:02:56 -07:00
Dan Gohman
8854dec01d Bump version to 0.24.0
I used a specially modified version of the publish script to avoid
bumping the `witx` version.
2021-03-04 18:17:03 -08:00
Johnnie Birch
2190fb68fd Update version for fs-set-times to 3.1 2021-03-04 11:36:31 -08:00
Dan Gohman
0824a934bf Add a minimal README.md for cap-std-sync. 2021-03-01 09:58:57 -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
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
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
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
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
b6cd7d84ad cap-std-sync: export ctx components 2021-01-30 13:38:44 -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
95ad13c82d wasi-common: break dep on system-interface by defining our own Advice enum 2021-01-29 17:03:08 -08:00
Pat Hickey
b48e7fcc5d integrate with c-api 2021-01-29 14:09:44 -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
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