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
27464c85f4
cargo.lock
2021-04-19 16:00:56 -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
c691d1864e
fix
2021-04-14 09:54:27 -07:00
Pat Hickey
247795c7ca
fix
2021-04-14 08:37:53 -07:00
Pat Hickey
759019811e
add tokio example
...
Co-authored-by: Alex Crichton <alex@alexcrichton.com >
2021-04-13 17:52:52 -07:00
Pat Hickey
66251c2e78
c-api: always use synchronous wasi-common
2021-04-13 17:51:18 -07:00
Pat Hickey
bac02c50f2
port command and example to use sync wasmtime_wasi
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
Pat Hickey
c62d7f9ea1
wasmtime_wiggle: when async feature is disabled, run async on dummy executor
2021-04-13 17:51:18 -07:00
Andrew Brown
45bee40f33
wasi-nn: use the newly-published Rust bindings for wasi-nn
...
The bindings are now published on [crates.io](https://crates.io/crates/wasi-nn ) and have been moved to their [own repository](https://github.com/bytecodealliance/wasi-nn ).
2021-04-13 16:00:06 -07:00
Andrew Brown
e9e4afe2c7
wasi-nn: use the MobileNet model instead of AlexNet
...
The MobileNet model is significantly smaller in size (14MB) than the AlexNet model (233MB); this change should reduce bandwidth used during CI.
2021-04-13 16:00:06 -07:00
Chris Fallin
27b3162f87
Merge pull request #2833 from abrown/2826
...
x64: fix Inst::store to understand all scalar types
2021-04-13 15:36:41 -07:00
Chris Fallin
8caac9ed79
Merge pull request #2823 from akirilov-arm/callee_saves
...
Cranelift AArch64: Improve the handling of callee-saved registers
2021-04-13 15:35:46 -07:00
Chris Fallin
f222802b7a
Merge pull request #2828 from bjorn3/fix_srem_i8
...
Fix srem.{i8,i16}
2021-04-13 15:35:40 -07:00
Andrew Brown
6bdef48473
x64: refactor to use Inst::store during lowering
...
This re-factoring replaces uses of `Inst::mov_r_m` with `Inst::store` to ensure there is only one code location to troubleshoot when generating store instructions for a specific type.
2021-04-13 13:09:07 -07:00
Andrew Brown
9b25b06d86
x64: store to all scalar sizes
...
Previously, `Inst::store` only understood a subset of the scalar types, which resulted in failures seen in #2826 . This change allows `Inst::store` to generate instructions for all scalar widths (`8 | 16 | 32 | 64`) since all of these are supported in the emission code of `Inst::MovRM`.
2021-04-13 12:38:35 -07:00
bjorn3
b272d4b7da
Fix srem.{i8,i16}
2021-04-13 21:28:27 +02:00
Anton Kirilov
7248abd591
Cranelift AArch64: Improve the handling of callee-saved registers
...
SIMD & FP registers are now saved and restored in pairs, similarly
to general-purpose registers. Also, only the bottom 64 bits of the
registers are saved and restored (in case of non-Baldrdash ABIs),
which is the requirement from the Procedure Call Standard for the
Arm 64-bit Architecture.
As for the callee-saved general-purpose registers, if a procedure
needs to save and restore an odd number of them, it no longer uses
store and load pair instructions for the last register.
Copyright (c) 2021, Arm Limited.
2021-04-13 20:23:08 +01:00
Chris Fallin
8387bc0d76
Merge pull request #2830 from cfallin/pin-nightly
...
CI: pin nightly Rust version to limit breakages to explicit pinning updates.
2021-04-13 12:06:44 -07:00
Chris Fallin
908d47011f
CI: pin nightly Rust version to limit breakages to explicit pinning updates.
2021-04-13 11:12:07 -07:00
Chris Fallin
67cc42d4c3
Merge pull request #2750 from bjorn3/anon_allocs
...
Support declaring anonymous functions and data objects
2021-04-12 12:11:11 -07:00
Nick Fitzgerald
2a32567871
Merge pull request #2821 from alexcrichton/faster-vmoffsets
...
Precompute fields in `VMOffsets`
2021-04-08 14:17:11 -07:00