Yuji Yamamoto
0df0a1cccb
Support Android
...
I'll send a PR after https://github.com/rust-lang/libc/pull/1622 is merged and released
2020-03-23 11:55:31 +09: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
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
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
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
bdeec52152
Fix imports in test; copy manual implementations of Debug
for wasi
2019-11-21 14:00:46 -08:00
Mark McCaskey
ddccdb92b8
More fixes for CI
2019-11-21 11:30:44 -08:00
Mark McCaskey
be217e8f8e
Update from feedback, fix CI issues, update wasi-test
2019-11-21 10:57:04 -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
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
newpavlov
b67f2c9f18
use getrandom instead of rand
2019-10-28 18:33:15 +03:00
Mark McCaskey
0fd0ab6e58
Merge branch 'master' into ventuzelo/add-detail-unimplemented-calls-runtime
2019-10-23 12:30:14 -07:00
Mark McCaskey
3a87edc0c1
Remove special casing of stdin, stdout, and stderr in WASI FS
2019-10-22 16:40:01 -07:00
Patrick Ventuzelo
4b3880c88b
add details when calling unimplemented!
2019-10-03 11:26:54 +02:00
Mark McCaskey
afbde49d1f
Update stub wasi generate import object fn
...
Fix typo
Fix debug issue
2019-10-02 13:16:47 -07:00
Mark McCaskey
5185f120f4
Update some from feedback, fix tests
...
format with 1.37
2019-10-02 11:25:55 -07:00
Mark McCaskey
4660bc6652
Update API to be more cleann
2019-09-30 17:52:53 -07:00
Mark McCaskey
38602b257b
Move validation to end of Builder
2019-09-30 16:32:18 -07:00
Mark McCaskey
2e860e589a
Add builder API for WasiState
2019-09-30 15:26:04 -07:00
Mark McCaskey
871310a851
Improve docs from feedback
2019-09-27 10:15:40 -07:00
Mark McCaskey
dc1744560c
Add lots of rustdocs and clean up one line of code
2019-09-26 17:17:50 -07:00
Syrus
9942d3ae98
Improved Emscripten / WASI autodetection
2019-09-22 18:23:22 -07:00