Commit Graph

2269 Commits

Author SHA1 Message Date
Jakub Konka
daa3c3aeef Update wasi-common version 2019-10-03 23:59:18 +02:00
Jakub Konka
603f7a9f22 Misc testsuite feature gated (#113)
* Put misc_testsuite behind a feature gate

This PR puts building and generating of misc_testsuite behind
a feature gate "misc_testsuite". This is mainly to allow projects
which pull `wasi-common` as a dependency not to have to have
`wasm32-wasi` target installed in order to build it as it currently
is.

* Update the CI

* Rename feature to wasm_tests

* Explain integration testing in the README
2019-10-03 23:08:55 +02:00
Jakub Konka
da59c95f0c Update dependencies and use Once::new() instead of ONCE_INIT 2019-10-03 10:59:45 +02:00
dependabot-preview[bot]
6749015c26 Update target-lexicon requirement from 0.4.0 to 0.8.1
Updates the requirements on [target-lexicon](https://github.com/CraneStation/target-lexicon) to permit the latest version.
- [Release notes](https://github.com/CraneStation/target-lexicon/releases)
- [Commits](https://github.com/CraneStation/target-lexicon/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 10:03:59 +02:00
dependabot-preview[bot]
cf9cbbb519 Update cranelift-wasm requirement from 0.41.0 to 0.44.0
Updates the requirements on [cranelift-wasm](https://github.com/CraneStation/cranelift) to permit the latest version.
- [Release notes](https://github.com/CraneStation/cranelift/releases)
- [Commits](https://github.com/CraneStation/cranelift/compare/v0.41.0...v0.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 10:00:46 +02:00
dependabot-preview[bot]
c097f567a9 Update cranelift-native requirement from 0.41.0 to 0.44.0
Updates the requirements on [cranelift-native](https://github.com/CraneStation/cranelift) to permit the latest version.
- [Release notes](https://github.com/CraneStation/cranelift/releases)
- [Commits](https://github.com/CraneStation/cranelift/compare/v0.41.0...v0.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 09:58:19 +02:00
Jakub Konka
b4c60f0c36 Merge pull request #111 from CraneStation/dependabot/cargo/rand-0.7
Update rand requirement from 0.6 to 0.7
2019-10-03 09:54:18 +02:00
dependabot-preview[bot]
183611d796 Update rand requirement from 0.6 to 0.7
Updates the requirements on [rand](https://github.com/rust-random/rand) to permit the latest version.
- [Release notes](https://github.com/rust-random/rand/releases)
- [Changelog](https://github.com/rust-random/rand/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-random/rand/compare/0.6.0...0.7.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 07:53:58 +00:00
dependabot-preview[bot]
825ed4f4d4 Update cranelift-entity requirement from 0.41.0 to 0.44.0
Updates the requirements on [cranelift-entity](https://github.com/CraneStation/cranelift) to permit the latest version.
- [Release notes](https://github.com/CraneStation/cranelift/releases)
- [Commits](https://github.com/CraneStation/cranelift/compare/v0.41.0...v0.44.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-10-03 09:52:12 +02:00
Dan Gohman
1017cbbf63 Update the compile fuzzer for Lightbeam changes. 2019-10-02 14:27:21 -07:00
Dan Gohman
8d89c3b479 Add options to wasmtime and wasm2obj to pick compilation strategy. 2019-10-02 13:59:49 -07:00
Dan Gohman
d4353f03cb Don't check assert_trap tests when Lightbeam is enabled.
Lightbeam doesn't yet produce trap metadata, so it can't yet match the
expected `assert_trap` messages. Disable them for now.
2019-10-02 13:42:26 -07:00
Dan Gohman
7092499c10 Update wasmtime-rust for new API. 2019-10-02 12:52:44 -07:00
Dan Gohman
c43803b19c Update dependencies. 2019-10-02 12:32:31 -07:00
Dan Gohman
239f412616 Test Lightbeam. 2019-10-02 12:32:18 -07:00
Dan Gohman
5bf2fc0ffa Don't enable Lightbeam tests if Lightbeam isn't enabled. 2019-10-02 12:06:00 -07:00
Dan Gohman
65b8afabe6 Make use of Lightbeam configurable.
This adds a `--always-lightbeam` option as well as an `--always-cranelift`
option, to allow the compilation strategy to be selected via the
command-line. This also enables regular testing for Lightbeam.
2019-10-02 11:54:06 -07:00
Dan Gohman
8c524815c3 Update dependencies. 2019-10-02 11:00:28 -07:00
Dan Gohman
8d52e389f8 Update Lightbeam for various API changes. 2019-10-02 10:10:32 -07:00
Dan Gohman
9757f7194c Merge Lightbeam into Wasmtime. 2019-10-02 09:49:38 -07:00
Dan Gohman
4cf15bd8c4 Remove the Lightbeam submodule. 2019-10-02 09:48:05 -07:00
Dan Gohman
5832eff76f Merge remote-tracking branch 'yurydelendik-lightbeam/cranelift-32' 2019-10-02 09:45:54 -07:00
Dan Gohman
8298a7a8b5 Merge remote-tracking branch 'jlb6740-lightbeam/update_cranelift_cg_ver_44' 2019-10-02 09:44:35 -07:00
Dan Gohman
6e963b670e Delete .rustfmt.toml 2019-10-02 09:34:09 -07:00
Dan Gohman
25a7e00d50 Delete .gitignore 2019-10-02 09:33:58 -07:00
Dan Gohman
6d5937dee0 Move lightbeam into a subdirectory. 2019-10-02 09:26:36 -07:00
Peter Huene
cb38b48156 Fix memory leaks in extern conversion functions in C API. (#395)
This fixes the memory leaks in the following functions which should not be
returning "owned" pointers:

* `wasm_extern_as_func`
* `wasm_func_as_extern`
* `wasm_extern_as_global`
* `wasm_global_as_extern`
* `wasm_extern_as_memory`
* `wasm_extern_as_table`

Additionally, this commit implements the `wasm_memory_as_extern` and
`wasm_table_as_extern` functions.

Fixes #394.
2019-10-02 05:54:36 -07:00
Johnnie Birch
5096d7cf92 Updates Cranelift Codegen dependence to 0.44
In trying to build the lightbeam feature in wasmtime there are
compile errors mostly related to outdated or missing trait
definitions. This patch moves the current cranelift codegen
dependence to 0.44 in support of that, though other changes
are still needed in wasmtime to get the feature to build.
2019-10-01 08:45:19 -07:00
Dan Gohman
6b2f3ebf7c Begin sketching out a new high-level fs API. (#91)
* Begin sketching out a new high-level `fs` API.

This is a very preliminary sketch of #83. It doesn't even compile yet,
but it shows a possible high-level structure of such an API.

* Stub out more functionality.

* Switch from a lazy_static WasiCtx to a borrowed one.

* Reformat some comments.

* Code-quote `Self`.

* Implement error translation for Windows.

* Calls to `fd_close` are now unsafe.

* Implement a few more functions.
2019-09-30 11:27:53 -07:00
Dan Gohman
a679412dd0 Sync with lucet-wasi (#106)
* Open /dev/null for writing as well as reading.

Port this fix to wasi-common:

b905c44483

* Remove all remaining uses of `std::mem::uninitialized`.

Patch inspired by:

2d6519d051

* Replace libc::memcpy() calls with std::ptr::copy_nonoverlapping()

Port this fix to wasi-common:

a3f3a33e9b

* Pass `WasiError` by value.

It's a `u16` underneath, so we can pass it by value.

* Avoid unnecessary explicit lifetime parameters.

* Use immutable references rather than mutable references.

Patch inspired by:

54baa4c38c
2019-09-30 19:22:11 +02:00
Jean-Bapiste Lepesme
e1b9c01d94 Fix opt_level setting passed to cranelift
With 92a19e9398 the optimisation levels of cranelift were renamed, without this change trying to use the -o flag on wasmtime runtime results in "error: Unexpected value for a setting, expected any among none, speed, speed_and_size".

"best" was renamed "speed_and_size", although I think "speed" is more adapted to wastime.

Bye,
JB.
2019-09-30 09:38:00 -07:00
Peter Huene
406bc7895a Implement reading module table imports in API. (#387)
This commit implements populating the table imports of a module from the API.

It also allows for `anyref` in table types as per the reference types proposal.
2019-09-27 05:50:54 -07:00
Dan Gohman
0653ae2c9c Fix compilation errors. 2019-09-26 19:37:23 -07:00
Dan Gohman
7899784663 Replace println error handling.
Use `panic!` and log macros for error handling instead of `println!`.
2019-09-26 19:37:23 -07:00
Dan Gohman
053fb3433e Fix compilation error. 2019-09-26 17:22:41 -07:00
Dan Gohman
34766f64ea Recognize "wasi_unstable_preview0" in addition to "wasi_unstable". 2019-09-26 17:22:41 -07:00
Andrew Brown
0667a2897d Ignore simd_const test when glibc has a floating point parsing issue 2019-09-26 15:46:18 -07:00
Andrew Brown
68de2247bc Avoid errors when converting V128 for the wasm-c-api
For this to work the wasm-c-api must add support for the V128 type (e.g. through __uint128_t)
2019-09-26 15:46:18 -07:00
Andrew Brown
03a9f0e461 Run SIMD const spec test 2019-09-26 15:46:18 -07:00
Andrew Brown
ce8e8662ff Enable SIMD in WAST testsuites 2019-09-26 15:46:18 -07:00
Andrew Brown
bb244d52d5 Pass enabled features (e.g. --enable-simd) on to WABT when running WAST files 2019-09-26 15:46:18 -07:00
Andrew Brown
fb1c473342 Alter invocation of functions to use 16-byte invocation arguments 2019-09-26 15:46:18 -07:00
Andrew Brown
5bd422b429 Add V128 type 2019-09-26 15:46:18 -07:00
Andrew Brown
290b51a5f6 Update wabt and spec test suite
Update wabt (see issue in https://github.com/pepyakin/wabt-rs/pull/56). Due to changes in wabt, the spec tests are updated as well.
2019-09-26 15:46:18 -07:00
Sergey Pepyakin
58e3e65bc8 Update lightbeam to rustfmt-ed revision 2019-09-26 15:44:47 -07:00
Dan Gohman
86142f2e94 Use r# to escape strings which may be rust keywords. (#379)
This is a minor simplification, replacing a hardcoded list of keywords.
2019-09-26 13:44:43 -07:00
Artur Jamro
bbd7e91d1c Reformat code with new rustfmt (#28) 2019-09-26 22:30:20 +02:00
Peter Huene
4288f33440 Fix borrow scope for store in WrappedCallable impl for WasmtimeFn.
This PR fixes the borrow scope of store in the `WrappedCallable` impl of
`WasmTimeFn` such that it does not remain borrowed across the call to
`wasmtime_call_trampoline`. By limiting the scope of the borrow, the
implementation can be reentered if an exported function calls an imported
function, which in turn calls another exported function.

Fixes #365.
2019-09-26 12:55:58 -07:00
Dan Gohman
a666e14279 Temporarily switch to the rustfmt branch of lightbeam.
This is branched from master to apply rustfmt, as a temporary measure to
fix the CI.
2019-09-26 12:45:29 -07:00
Dan Gohman
10845134f7 Update to latest walrus, wasmparser, and wasm-webidl-bindings. 2019-09-26 12:34:58 -07:00