Dan Gohman
67edb00f29
Use getrandom rather than getentropy on Linux for random_get.
...
getentropy is limited to 256 bytes, so switch to getrandom.
2019-05-15 11:44:45 -07:00
Jakub Konka
3e94af81df
Add Rust impl of wasmtime_ssp_fd_prestat_dir_name
2019-05-07 13:20:55 -07:00
Jakub Konka
d6b2faeeb4
Modify fd_prestat to hold C-str together with its length
2019-05-01 15:32:28 -07:00
Jakub Konka
5c555406ca
Add Rust impl of wasmtime_ssp_fd_prestat_get
...
In more detail, this commit:
* makes fd_prestat_get safe
* rewrites fd_prestats_get_entry in (safe) Rust
* creates helper macros for rwlock read lock and unlock
2019-05-01 15:32:28 -07:00
Dan Gohman
ce3c0d98d3
Don't rewrite EBUSY to EINVAL in path_rename.
2019-04-29 23:36:21 -07:00
Dan Gohman
049c926e08
Handle set-size rights correctly when truncating a file.
...
If a path_open call is requesting __WASI_RIGHT_FD_FILESTAT_SET_SIZE,
interpret that as a request for write privleges. If it is requesting
O_TRUNC, require __WASI_RIGHT_PATH_FILESTAT_SET_SIZE, since this is
a path operation rather than a FD operation.
2019-04-29 23:34:34 -07:00
Jakub Konka
a51ffb6b6d
Add Rust impl of wasmtime_ssp_sched_yield
...
Also, add Rust implementation of errno and convert_errno.
2019-04-29 23:33:40 -07:00
Jakub Konka
69e44caa29
Add Rust impl of wasmtime_ssp_proc_exit
2019-04-27 09:06:41 -07:00
Dan Gohman
e906370661
Make path_open return ELOOP on O_NOFOLLOW|O_DIRECTORY on a symlink.
2019-04-26 14:09:12 -07:00
Dan Gohman
f10cd2f4b1
Don't allow a preopened file descriptor to be renamed over.
...
This is consistent with fd_close's behavior, and is likely temporary
until other options are designed.
2019-04-26 13:06:42 -07:00
Dan Gohman
7e11511abd
Remove dead code.
2019-04-07 05:31:57 -07:00
Dan Gohman
07b83c5db3
Add __WASI_RIGHT_PATH_FILESTAT_SET_SIZE to RIGHTS_DIRECTORY_BASE.
...
This is a new right not present in CloudABI, which is why the code
previously didn't include it.
2019-04-05 15:09:14 -07:00
Dan Gohman
7378a0bfbe
Update Travis from trusty to xenial. ( #84 )
...
* Update Travis from trusty to xenial.
* Don't use getentropy on GLIBC < 2.25.
2019-03-31 05:46:32 -07:00
Dan Gohman
b2fefe7714
WASI prototype design, implementation, and documentation.
...
This adds documents describing the WASI Core API, and an implementation in
Wasmtime.
2019-03-27 10:58:43 -07:00