Commit Graph

164 Commits

Author SHA1 Message Date
Jakub Konka
500e32a3b2 Use fcntl with F_RDADVISE on MacOS 2019-09-14 08:12:49 +02:00
Marcin Mielniczuk
8d7e80f440 Refactor error handling in fd_advise 2019-09-13 14:38:17 +02:00
Marcin Mielniczuk
86e3d3e307 Fix a typo in fd_advise 2019-09-13 14:38:17 +02:00
Jakub Konka
f22a468f91 Add fd_advise smoke test 2019-09-13 12:19:34 +02:00
Jakub Konka
4915f0734e Ignore failing tests for the moment 2019-09-12 08:58:19 +02:00
Jakub Konka
d69b295985 Sync wasi_misc_tests 2019-09-12 08:58:19 +02:00
Marcin Mielniczuk
f07392c175 Quick fix for path_filestat_set_times. Closes #95. 2019-09-11 15:01:01 -07:00
Dan Gohman
e85376ec07 Add doc comments to WasiCtxBuilder's methods. 2019-09-11 11:33:37 +02:00
Dan Gohman
c1c74ca54b Add a method for inhering the command-line arguments from the host. 2019-09-11 11:05:29 +02:00
Dan Gohman
aea2f11f06 Mark WasiCtx's internals as pub(crate). 2019-09-11 10:39:02 +02:00
Dan Gohman
52b69c21cf Miscellaneous clippy fixes. 2019-09-09 18:07:39 +02:00
Dan Gohman
39161d020f Clippy: use from functions rather than as casts.
`as` is a many-faceted conversion operator, while `from` functions only do
lossless conversions.
2019-09-09 18:07:39 +02:00
Dan Gohman
09ace35295 Clippy: use ptr::add rather than ptr::offset. 2019-09-09 18:07:39 +02:00
Dan Gohman
34db7f0150 Update to syn 1 and quote 1. 2019-09-09 16:33:32 +02:00
Jakub Konka
33c78e2e5b Fix formatting 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
612617b0ba reuse the host::* consts in enum Error 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
c5339d01cf refactor errno_from_ioerror 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
ae836df42d reformat 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
57c19cf073 fixes 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
438c693508 Impl Fail 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
b812304d86 Remove .vscode 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
3fd0cdcc12 Cleanup 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
b09f7e860f Refactor try_from and try_into error handing. 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
14aaffd46f Initial error refactor 2019-09-09 11:26:06 +02:00
Marcin Mielniczuk
85a41d449c Treat FIFOs' type as __WASI_FILETYPE_UNKNOWN. 2019-09-06 20:38:50 -07:00
Marcin Mielniczuk
c2d2b8066b Add .vscode to .gitignore 2019-09-06 20:38:50 -07:00
Marcin Mielniczuk
d308c47822 Add a no-op implementation of fd_advise on Windows
Windows apparently has no similar syscall available.
2019-09-06 18:06:51 -07:00
Marcin Mielniczuk
947eb1fb53 Move fd_advise on Linux to nix 2019-08-30 15:53:07 +02:00
Jakub Konka
aa28a6d697 Add a test for fd_readdir 2019-08-28 22:50:44 +02:00
Jakub Konka
3609a82dc9 Fix incorrect fd_readdir behaviour
* when executed twice in a row, need to manually reset the stream
  by calling seekdir with __WASI_DIRCOOKIE_START, if __WASI_DIRCOOKIE_START
  was specified
* fix mapping between d_type and __wasi_filetype_t
* include minor refactor - removes use of wasm32 module on the
  host's side
2019-08-28 22:01:24 +02:00
Marcin Mielniczuk
417ec0be01 Update src/sys/windows/hostcalls_impl/fs.rs
Co-Authored-By: Jakub Konka <kubkon@jakubkonka.com>
2019-08-26 15:49:48 +02:00
Marcin Mielniczuk
d617fe67ad Check for socket type in filetype.
The signature for Windows has also been changed, so that the function
can be reused in cross-platform modules.
2019-08-26 15:49:48 +02:00
Marcin Mielniczuk
8db57bd6c6 Check if testsuite exists, set target dir 2019-08-23 20:36:11 -07:00
Jakub Konka
7e0e8daf46 Check out submodules in Azure 2019-08-23 20:36:11 -07:00
Marcin Mielniczuk
9f840ff6f1 Quick & dirty misc_testsuite 2019-08-23 20:36:11 -07:00
Marcin Mielniczuk
9950bddee5 Use safe casts in path_filestat_set_times on unix. 2019-08-23 13:02:21 +02:00
Sendil Kumar
69d60c4711 update nix version 2019-08-23 09:24:38 +02:00
Marcin Mielniczuk
1bf5106f40 Implement path_filestat_get & path_filestat_set_times on Windows. 2019-08-21 13:20:40 +02:00
Marcin Mielniczuk
2ed69b1d10 Add .concatenate() method to PathGet on Windows. 2019-08-21 13:20:40 +02:00
Marcin Mielniczuk
7a991921bf Add the test for path_filestat_* 2019-08-21 09:57:35 +02:00
Dan Gohman
d7883dd60a Don't publish misc_testsuite/*.wasm. 2019-08-21 00:04:00 -07:00
Dan Gohman
eb90f76b42 Add #![cfg(windows)] to allow publishing from non-Windows hosts. 2019-08-21 00:04:00 -07:00
Dan Gohman
19055d0178 Add description fields. 2019-08-21 00:04:00 -07:00
Jakub Konka
cf0bef84cc Fix filestat_from_nix conversion fn 2019-08-20 23:38:53 -07:00
Dan Gohman
f37b672c8d Update the pinned wasmtime revision.
This resynchronizes the versions of cranelift used in wasi-common
and wasmtime to 0.40.
2019-08-21 07:46:18 +02:00
Dan Gohman
6921782fbf Add license declarations to headers. 2019-08-20 16:17:36 -07:00
Dan Gohman
500bf83082 Update to latest cranelift and target-lexicon. 2019-08-20 16:17:36 -07:00
Marcin Mielniczuk
065fbea252 Implement path_filestat_set_times using nix instead of libc.
As advised in #16.
2019-08-20 17:28:25 +02:00
Jakub Konka
a38af109b3 Fix linter warnings 2019-08-14 12:59:00 +02:00
Dan Gohman
05852977ac Use char/byte literals instead of single-char/byte string literals. 2019-08-14 12:59:00 +02:00