Dan Gohman
1882fc41bb
Build sandboxed-system-primitives with -std=gnu99.
2019-05-27 09:14:29 -07:00
Dan Gohman
f486d61629
Make use of static_assert conditional on whether it's available.
2019-05-27 09:07:04 -07:00
Dan Gohman
176538b860
Support GCC and clang versions that lack <stdatomic.h>.
...
Add a code path to use the GCC builtins for atomics, which are supported
in older compiler versions, rather than the new <stdatomic.h>.
2019-05-27 07:48:18 +02:00
Jef
dc3a4d7f4a
Fix register cycles, fix a minor issue in pushing
2019-05-24 13:21:52 +02:00
Van der Auwermeulen Grégoire
60807c5e54
Update README.md
2019-05-22 22:42:31 +02:00
Jef
8578a1b07f
Merge pull request #23 from afinch7/ctz_clz_fix
...
Fix for ctz and clz
2019-05-22 18:54:31 +02:00
afinch7
9b6abc1497
fmt
2019-05-22 09:47:04 -04:00
afinch7
48b7f8e443
detect lzcnt/tzcnt support and use if available
2019-05-21 10:50:40 -04:00
Van der Auwermeulen Grégoire
658b5aabcc
Update WASI-tutorial.md
2019-05-21 06:45:28 -07:00
Dan Gohman
6b2eee21b9
Update the description of Cargo.toml.
2019-05-18 21:01:14 -07:00
Dan Gohman
eb2b51353e
Rename the top-level crate from wasmtime-tools to wasmtime.
...
This is a binary application crate which contains the wasmtime
command-line application.
2019-05-18 20:25:08 -07:00
Dan Gohman
106c8c4cb6
Remove the polyfill from the master branch.
...
The polyfill now lives on the polyfill branch. Add a README.md file
pointing to the new location.
2019-05-18 15:40:30 -07:00
Will Scott
1320b111eb
fix guest iovs pointer mapping
2019-05-18 15:31:14 -07:00
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
afinch7
2563dc53a1
fixed registry leak and literal casts
2019-05-15 08:20:23 -04:00
afinch7
6e9cff13a2
revert .gitignore changes
2019-05-15 08:01:43 -04:00
Yury Delendik
6740704b74
Expose Module reference from InstanceHandle
2019-05-14 15:02:06 -07:00
afinch7
a5fa03abb2
fix for ctz and clz
2019-05-14 16:14:00 -04:00
Dan Gohman
2b5be77fa5
"wasm32-unknown-wasi" is now "wasm32-wasi".
2019-05-13 21:40:56 -07:00
Jef
680473c50c
Fix param names
2019-05-13 15:23:33 +02:00
Alan Foster
1c0efd03b3
Add example of compiling wat and running with wasmtime
2019-05-12 15:12:54 +02:00
Zhuowei Zhang
ca8c8b3370
js-polyfill: support Safari, which doesn't have instantiateStreaming
2019-05-10 14:24:59 -07:00
Jef
b67514bd11
Merge pull request #20 from tiborvass/fix-brif-typo
...
microwasm: fix comment typo for BrIf
2019-05-08 07:29:36 +02:00
Jakub Konka
072b2e8697
Update .rustfmt.toml
2019-05-07 13:56:04 -07:00
Jakub Konka
3e94af81df
Add Rust impl of wasmtime_ssp_fd_prestat_dir_name
2019-05-07 13:20:55 -07:00
Jef
30583954eb
Add better debugging tools
2019-05-06 10:44:13 +02:00
Till Schneidereit
2549abd671
Merge pull request #133 from kubkon/kubkon/rust-tutorial
...
Update WASI tutorial with Rust howto as well
2019-05-05 15:10:05 +02:00
Jakub Konka
e41d333878
Update WASI tutorial with Rust howto as well
2019-05-02 22:02:19 +02:00
Till Schneidereit
e12f797c2c
Merge pull request #132 from kubkon/patch-1
...
Add link to Rust version of the WASI tutorial
2019-05-02 15:56:01 +02:00
Jakub Konka
5c14d1eb6f
Add link to Rust version of the WASI tutorial
...
I thought it might be useful for future WASI users to have the WASI tutorial written not only in C but also in Rust.
I'm also happy to keep the tutorial up to date with the current state of WASI target in Rust.
2019-05-02 15:49:30 +02: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
f7245f40a1
Port host::__wasi_preopentype_t to Rust
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
b0eab7398d
Don't decode the incoming events to poll_oneoff. ( #113 )
...
The events array is an output-only array, so we don't need to decode its
contents.
2019-04-30 06:42:48 -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
Dan Gohman
e62607e552
When path_open fails, set the output fd to -1.
2019-04-29 23:34:13 -07:00
Jakub Konka
86b7a52009
Port host::__wasi_errno_t errors to Rust
...
They are now blacklisted in the bindgen.
2019-04-29 23:33:40 -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
Dan Gohman
26cbbaab41
Clarify that path_open's path is a relative path.
2019-04-29 07:34:28 -07:00
Dan Gohman
29c2616484
Update the documentation about C/C++ toolchain limitations.
...
Document that `setjmp`/`longjmp` and C++ exceptions are unsupported, and
update the documentation about the function signature mismatch bug to
reflect that it's now just a warning rather than a fatal error.
2019-04-28 16:41:58 -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
Jef
21cdd55cd2
Fix various panics and miscompilations
2019-04-24 15:00:15 +02:00
Jef
745d9ae162
Implement rem in backend - not every backend will act like x86
2019-04-24 12:32:17 +02:00
Jef
ea1ec9491e
Don't use cmov (no need)
2019-04-24 09:16:38 +02:00
Dan Gohman
7813cc9d2d
Fix a trace logging message.
2019-04-23 12:08:06 -07:00
Jake Lang
a2eafd400f
Document using wasmtime as a dependency in the README
2019-04-19 15:09:59 -07:00
Joel Martin
b8fbae29e1
WASI-api.md: fix fsync -> fcntl
2019-04-18 13:25:40 -07:00