Pat Hickey
ff8bdc390b
reuse cap-std-syncs windows scheduler without copypaste
2021-05-06 15:45:54 -07:00
Pat Hickey
3d9b98f1df
fix example
2021-05-06 14:34:30 -07:00
Pat Hickey
e50f1b24a9
better name and comment
2021-05-06 11:24:48 -07:00
Pat Hickey
76be1959c4
explain!
2021-05-06 11:20:38 -07:00
Pat Hickey
f3ffd74566
dont depend on wiggle for just the one func
2021-05-06 11:19:25 -07:00
Pat Hickey
208013e34e
de-duplicate code
2021-05-06 11:12:53 -07:00
Pat Hickey
f4d851126d
tests dont need fuel
2021-05-06 10:53:25 -07:00
Pat Hickey
6616c1eaf1
fix warnings
2021-05-05 13:32:05 -07:00
Pat Hickey
9e04c5333c
poll oneoff tests: what if we read a non-empty file?
2021-05-05 13:08:33 -07:00
Pat Hickey
3e8ea090c6
ci debugging
2021-05-05 11:24:27 -07:00
Pat Hickey
0faf3b248e
wasmtime-wasi: keep exporting sync at the top level
2021-05-05 11:00:59 -07:00
Pat Hickey
e0f3423161
support windows
2021-05-04 14:28:45 -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
686d8c22f9
fix test harness
2021-05-04 11:18:20 -07:00
Pat Hickey
5ab8346a05
fix windows sync scheduler
2021-05-03 12:23:24 -07:00
Pat Hickey
3df9cddf10
better unit test
2021-05-03 11:59:30 -07:00
Pat Hickey
62c4f0d1f7
wasi-tokio kinda sorta working
2021-05-01 15:39:09 -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
ab4f5bb674
move dummy executor out to wiggle:: for reuse
2021-04-29 16:26:50 -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
02581ddda0
poll_oneoff test: don't try to poll same fd for read and write
2021-04-27 17:41:07 -07:00
Pat Hickey
a532d0f379
subscribe to mut fds
2021-04-26 16:42:02 -07:00
Pat Hickey
867d2c9a35
follow the types
2021-04-26 15:49:27 -07:00
Pat Hickey
b307dce2ab
add readable and writable futures to WasiFile trait
2021-04-26 14:43:16 -07:00
Pat Hickey
fa44ec2da2
tokio sched: comment out just to make it compile
2021-04-26 14:42:22 -07:00
Pat Hickey
3d3a2acc1b
wasi-tokio: WIP need to port the sync scheduler into a spawn_blocking
2021-04-19 16:00:38 -07:00
Pat Hickey
8667d8c244
test-programs: test wasi-tokio
2021-04-19 16:00:27 -07:00
Pat Hickey
675b579361
use AsyncSeek
2021-04-19 14:35:46 -07:00
Pat Hickey
d2a98ced53
use some better traits
2021-04-15 16:00:11 -07:00
Pat Hickey
9880d09f1f
do some programming
2021-04-15 14:50:17 -07:00
Pat Hickey
33dbd4388c
use tokio's File with a cap-std Dir
2021-04-15 11:39:11 -07:00
Pat Hickey
2ddf4c1da9
tokio example requires enabling a cargo feature
...
and also a dummy C example
2021-04-14 16:54:52 -07:00
Pat Hickey
7202494e9d
fix windows sched
2021-04-14 16:17:21 -07:00
Pat Hickey
b883bda022
fix test-programs for sync wasi
2021-04-14 16:06:50 -07:00
Pat Hickey
2f0c7e59e7
wasmtime-wasi: all funcs are async now
2021-04-14 16:04:41 -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
564e43d1b3
WasiDir: make all operations async
2021-04-14 15:22:25 -07:00
Pat Hickey
00e58567d9
WasiFile: all operations are now async
...
only fn as_any(&self) -> &dyn Any doesnt get to be async.
2021-04-14 15:17:31 -07:00
Pat Hickey
025a1ecff4
wasi-common: snapshots 0 and 1 traits are all async now
2021-04-14 15:05:38 -07:00
Pat Hickey
228096c840
wiggle: convenient syntax for marking all funcs async
2021-04-14 14:51:24 -07:00
Pat Hickey
0127676621
wasi-cap-std-async is better named wasi-tokio
2021-04-14 14:06:36 -07:00
Pat Hickey
247795c7ca
fix
2021-04-14 08:37:53 -07:00
Pat Hickey
66251c2e78
c-api: always use synchronous wasi-common
2021-04-13 17:51:18 -07:00
Pat Hickey
2b7a93c403
wasmtime-wasi: two distinct definitions of the Wasi struct, when sync vs async
2021-04-13 17:51:18 -07:00
Pat Hickey
201da20c63
make wasmtime-wasi configurable at macro whether its real async or block_on
2021-04-13 17:51:18 -07:00
Pat Hickey
8f9fb1f4e2
make wasi-cap-std-async work with wasmtime-wasi
2021-04-13 17:51:18 -07:00
Pat Hickey
ac3b456523
wasi-cap-std-async: exactly like wasi-cap-std-sync but with a different WasiSched
2021-04-13 17:51:18 -07:00
Pat Hickey
22d18ffb0d
cap-std-sync: async-trait e-paperwork
2021-04-13 17:51:18 -07:00
Pat Hickey
68daec7e7d
wasi-common: WasiSched is an async trait now; poll_oneoff and sched_yield are async methods
2021-04-13 17:51:18 -07:00