292 Commits

Author SHA1 Message Date
Mark McCaskey
c295adbaa8 Prepare for 0.15.0 release 2020-03-04 12:26:19 -08:00
Mark McCaskey
69fd76af10 Improve support for preopened directories in WASI syscalls
Also filters our default logging more and improves some debug statements
2020-03-04 11:51:24 -08:00
Syrus
7a88a320c7 Allow / in mapdir wasm path 2020-02-29 08:47:25 -08:00
Mark McCaskey
ce21910077 Prepare for 0.14.1 release
0.14.1 differs from 0.14.0 primarily in that the GNU/Linux build is
built on Ubuntu 16.04 instead of 18.04, meaning we'll use an earlier
version of GLIBC.
2020-02-24 13:20:12 -08:00
Mark McCaskey
1374bf0806 Prepare for 0.14.0 release 2020-02-20 13:15:29 -08:00
Mark McCaskey
c005f94a55 Add clippy::missing_safety_doc lint to wasi, misc clean up 2020-02-17 15:15:04 -08:00
Syrus
61c85b3fbf Improved fd_write debugging 2020-02-13 10:35:48 -08:00
Syrus
62e1526037 Fixed WASI isatty 2020-02-12 23:00:30 -08:00
losfair
e0aafbe9dd Remove WasmTrapInfo and passExceptionCode in the generic Box<Any> container. 2020-02-06 23:49:50 +08:00
Mark McCaskey
929825cba1 Improve some docs and misc code segments 2020-01-31 15:42:18 -08:00
MikaelUrankar
fcbdada259 Port to FreeBSD 2020-01-28 21:49:55 +01:00
Mark McCaskey
4862828165 Clean up and add another example 2020-01-21 17:06:50 -08:00
Mark McCaskey
19ea53b86e
Update lib/wasi/src/state/builder.rs
Co-Authored-By: nlewycky <nick@wasmer.io>
2020-01-21 16:57:33 -08:00
Mark McCaskey
7ea6943af1 Update example in doc to use new preopened dir builder 2020-01-21 16:33:49 -08:00
Mark McCaskey
d1cadf98e1 Add new features to WasiState builder API
Allows for ergonomic swapping out of stdin, stdout, stderr as well as
a new PreopenDir sub-builder which enables for user control over the
permissions that the directory is preopened with.

This PR includes breaking changes to the pubilc API.
2020-01-21 16:23:30 -08:00
Mark McCaskey
5931944a21 Add clippy error checking in lint step 2020-01-17 15:47:45 -08:00
Mark McCaskey
430524ce51 Prepare for 0.13.1 release 2020-01-16 14:07:18 -08:00
Mark McCaskey
3c996bc821 Prepare for 0.13.0 release 2020-01-15 11:09:47 -08:00
Mark McCaskey
286e5db370 Remove vestigial debug features from various crates 2020-01-14 13:03:19 -08:00
Mark McCaskey
12f7416a85 Update logging to use log, add command line flag to toggle it 2020-01-14 12:41:46 -08:00
Mark McCaskey
ad8945a555 Add misc doc link fixes and update old comment 2019-12-19 16:22:51 -05:00
Mark McCaskey
6a74b7e994 Prepare for 0.12.0 release 2019-12-18 17:24:29 -05:00
Mark McCaskey
caa75fa157 Merge branch 'master' into wat 2019-12-18 15:42:14 -05:00
Mark McCaskey
7d77511ad5 Additional clean up, cargo update to fix merge issue 2019-12-18 15:24:42 -05:00
Mark McCaskey
4539ef44d0 Rename to experimental-io-devices and clean up for release 2019-12-18 14:10:54 -05:00
Mark McCaskey
bb344c1ab1 Add fn for splitting borrow of memory & data in Ctx, use in WASI 2019-12-16 16:48:52 -05:00
Mark McCaskey
24e0e34fb2 Add more doc comments to our WASI implementation 2019-12-13 17:11:13 -08:00
Mark McCaskey
c11d19e759 Add doc comments for WASI FD associated constants 2019-12-12 15:48:58 -08:00
Mark McCaskey
5da98caf83 Merge branch 'master' into wat 2019-12-04 17:17:00 -08:00
Ivan Enderlin
871db8547c
Merge branch 'master' into fix-wasi-get-version 2019-12-04 15:25:11 +01:00
Ivan Enderlin
c12dd859bb doc(wasi) Improve documentation of WasiVersion::Latest. 2019-12-04 14:12:30 +01:00
Ivan Enderlin
2b7f0d19cb feat(wasi) Introduce a strict mode for get_wasi_version.
In strict mode, `get_wasi_version` uses the previous behavior, i.e. it
checks that there is only one namespace for all imports, and that this
namespace is a WASI namespace (and uses it to find the WASI version).

In non-strict mode, `get_wasi_version` checks that at least one WASI
namespace exists (and uses it to find the WASI version).

By default, `is_wasi_module` uses the non-strict mode.
2019-12-04 13:29:28 +01:00
Ivan Enderlin
a79beede72 feat(wasi) Add the “volatile” WasiVersion::Latest version.
In addition to `Snapshot0` and `Snapshot1`, I believe it is an
interesting API to provide the `Latest` version, so that the user can
write:

```rust
generate_import_object_for_version(WasiVersion::Latest, …);
```

This is a way to ensure that modules will run only if they come with
the latest WASI version (in case of security issues for instance), by
just updating the runtime.

Note that it can be dangerous if not used carefully, but we assume the
user knows what it does by sticking on a specific “floating” version.

Also note that the `Latest` version is never returned by any API. It
is provided only by the user.
2019-12-02 15:53:40 +01:00
Ivan Enderlin
7f3680c27a fix(wasi) get_wasi_version is broken with multiple namespaces.
If a module has multiple import namespaces, `get_wasi_version` is
broken because it assumes a module must only have a single namespace.

This patch fixes it by a slower `get_wasi_version` function, but a
correct one. As soon as the `wasi_unstable` or
`wasi_snapshot_preview1` namespace is met, `get_wasi_version` maps it
to the respective `WasiVersion` variant. It assumes however that a
module must hold a unique WASI version.
2019-12-02 15:36:45 +01:00
Mark McCaskey
bb1e7a8d78 Prepare for 0.11.0 release 2019-11-22 11:18:06 -08:00
Mark McCaskey
bdeec52152 Fix imports in test; copy manual implementations of Debug for wasi 2019-11-21 14:00:46 -08:00
Mark McCaskey
68fa9e2639 Merge branch 'feature/add-support-for-new-wasi' of github.com:wasmerio/wasmer into feature/add-support-for-new-wasi 2019-11-21 11:31:00 -08:00
Mark McCaskey
ddccdb92b8 More fixes for CI 2019-11-21 11:30:44 -08:00
Mark McCaskey
36a26717c2
Merge branch 'master' into feature/add-support-for-new-wasi 2019-11-21 10:58:05 -08:00
Mark McCaskey
be217e8f8e Update from feedback, fix CI issues, update wasi-test 2019-11-21 10:57:04 -08:00
Mark McCaskey
cebcb4c927 Prepare for 0.10.2 release 2019-11-15 14:55:53 -08:00
Mark McCaskey
9127eaf825 Add categories and keywords to Cargo.tomls 2019-11-13 15:46:09 -08:00
Mark McCaskey
2b2a0628f7 Update from feedback, improve docs on new wasi fns 2019-11-12 17:02:07 -08:00
Mark McCaskey
f1e5cd39d8 Add support for new WASI snapshot, backwards compat too 2019-11-12 13:01:03 -08:00
Mark McCaskey
69950d9e5f Prepare for 0.10.1 release 2019-11-11 16:22:37 -08:00
Mark McCaskey
0a216c0779 Prepare for 0.10.0 release 2019-11-11 12:13:53 -08:00
Mark McCaskey
64783423ea Fix WASI append bug, add test 2019-11-08 11:17:04 -08:00
Mark McCaskey
ef5faccb76 Update __wasi_rights_t and __wasi_signal_t with published changes 2019-11-04 13:45:19 -08:00
Mark McCaskey
aaa0160c95 Fix values of __wasi_advice_t 2019-11-04 10:48:42 -08:00
newpavlov
8e6f4c448b reuse __WASI_EIO error code 2019-10-28 18:37:14 +03:00