Commit Graph

1373 Commits

Author SHA1 Message Date
Dan Gohman
6b7ebfdddc Rust 1.36, with wasm32-wasi support, is now stable! 2019-07-10 12:27:21 -07:00
Dan Gohman
9d91a937dc Update wasmtime-wasi-c to cloudabi-utils 223dadc5.
We already had a forward-port of d5abd351d, so this just contains a
minor and unobservable bug fix.
2019-07-06 07:18:36 +02:00
Dan Gohman
1a10f4a002 Update to Cranelift 1.33 and require Rust 1.35.
Cranelift requires Rust 1.35; update accordingly.
2019-07-03 11:16:55 -07:00
Salim Shaaban Salim
89cd327c97 Print correct version of bin tools (#183)
* Print correct version of bin tools

Not something important, but I use these tools for some testing and
they print wrong version with --version flag.
2019-07-03 11:12:32 -07:00
Yury Delendik
210e959333 Allow jump tables in wasmtime. 2019-07-02 14:07:30 -07:00
Yury Delendik
fb9d6061e4 Update cranelift, faerie, target-lexicon and wasmparser deps 2019-07-02 14:07:30 -07:00
Dan Gohman
e3c021cc59 Downgrade memoffset to 0.2.1.
Version 0.3.0 was yanked from crates.io.
2019-07-02 13:27:03 -07:00
Yury Delendik
d52ab02835 Fix skipping dead DWARF records 2019-06-26 14:26:26 -07:00
Yury Delendik
19cfec6e8f Ignore non-existent refs in the transformed DWARF 2019-06-26 14:25:45 -07:00
Dan Gohman
c0ba4753eb Enable wasi-common by default (#177)
This removes the --wasi-common, as it's now on by default, and adds a
--wasi-c option to enable the wasi-c implementation.
2019-06-25 02:05:49 -07:00
Van der Auwermeulen Grégoire
d900a5f6ef Update WASI-tutorial.md
consistent
2019-06-19 07:13:51 -07:00
Van der Auwermeulen Grégoire
3425553dc6 Update WASI-tutorial.md
Update README based on feedback
2019-06-19 07:13:51 -07:00
Van der Auwermeulen Grégoire
15b85dc285 Update WASI-tutorial.md 2019-06-19 07:13:51 -07:00
Jakub Konka
ce8912abf3 Use preopen_dir handlers exposed in wasi-common 2019-06-19 07:12:00 -07:00
Sendil Kumar
ab8f8ef5d8 Adds an explicit way to use the args inside the WebAssembly Module 2019-06-19 07:10:56 -07:00
Jakub Konka
7ac6666fcb Fixes incorrect guest fd encoding
Surfaced when running sunfishcode/misc-tests. When trying to
truncate the file without the __WASI_RIGHT_PATH_FILESTAT_SET_SIZE
right, error __WASI_ENOTCAPABLE was correctly returned, however,
the guest fd pointer was not encoded to -1 in that case. This
commit fixes it by taking out the guest fd encoding out of the
conditional branch which turns out obsolete.
2019-06-19 07:09:46 -07:00
Ari Lotter
8dc1d90352 Use try_from replacing cast in wasmtime-runtime. 2019-06-09 12:27:28 +02:00
Ari Lotter
f3f6ab0583 Use try_from replacing cast in wasmtime-wasi-c. 2019-06-09 12:27:28 +02:00
Ari Lotter
1158b5bd6c Use try_from replacing cast in wasmtime-environ.
`try_from` is stable now, so cast is unnecessary.
2019-06-09 12:27:28 +02:00
Jakub Konka
e530a582af Fix preopening dirs on Windows 2019-06-03 13:23:07 -07:00
Dan Gohman
635be8a032 Make the wasmtime-wasi-c dependency conditional on Unix. 2019-06-03 13:23:07 -07:00
Dan Gohman
06b6ec42b9 Provide the C WASI implementation as an option.
This adds the C WASI implementation as a new crate, wasmtime-wasi-c,
and adds a command-line flag to the wasmtime command-line driver to
select which WASI implementation to use.
2019-06-03 13:23:07 -07:00
Jakub Konka
d57fbc7d0c Sync with wasi-common 2019-06-03 13:23:07 -07:00
Jakub Konka
e44d8e8fe3 Update min rustc to 1.34 as required by wasi-common 2019-06-03 13:23:07 -07:00
Jakub Konka
e8142f076d Migrate to wasi-common crate 2019-06-03 13:23:07 -07:00
Dan Gohman
3dfeab50ad Don't add the NULL terminator to argv and environ arrays.
The wasm userspace has been updated to do that instead, in
https://github.com/CraneStation/wasi-sysroot/pull/72.
2019-06-02 08:54:51 +02:00
Dan Gohman
61eb4738fe wasi-sysroot is now named wasi-libc. (#167) 2019-05-31 10:15:52 +02:00
Dan Gohman
825f1d764a Fix a compiler warning.
Fix the following warning from Rust 1.35:

warning: cannot borrow `*self` as mutable because it is also borrowed as immutable
   --> wasmtime-runtime/src/instance.rs:473:25
    |
465 |         } else if let Some(start_export) = self.module.exports.get("_start") {
    |                                            ----------- immutable borrow occurs here
...
473 |                         self.invoke_function(*func_index)
    |                         ^^^^                 ----------- immutable borrow later used here
    |                         |
    |                         mutable borrow occurs here
    |
    = note: #[warn(mutable_borrow_reservation_conflict)] on by default
    = warning: this borrowing pattern was not meant to be accepted, and may become a hard error in the future
    = note: for more information, see issue #59159 <https://github.com/rust-lang/rust/issues/59159>
2019-05-30 18:44:38 -07:00
Dan Gohman
b5f4949597 Avoid using C features which depends on _Generic. 2019-05-27 10:13:33 -07:00
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
Van der Auwermeulen Grégoire
60807c5e54 Update README.md 2019-05-22 22:42:31 +02: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
Yury Delendik
6740704b74 Expose Module reference from InstanceHandle 2019-05-14 15:02:06 -07:00
Dan Gohman
2b5be77fa5 "wasm32-unknown-wasi" is now "wasm32-wasi". 2019-05-13 21:40:56 -07: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
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
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