Commit Graph

8145 Commits

Author SHA1 Message Date
Andrew Brown
96556ed700 Optionally compile wasmtime-bench-api with wasi-nn and wasi-crypto (#2677)
This adds the ability to add feature flags (e.g. `--features wasi-nn`) when compiling `wasmtime-bench-api` to allow benchmarking Wasmtime with WASI proposals included. Note that due to https://github.com/rust-lang/cargo/issues/5364, these features are only available:
 - in the `crates/bench-api` directory, e.g. `pushd crates/bench-api; cargo build --features wasi-crypto`
 - or from the top-level project directory using `-Zpackage-features`, e.g. `OPENVINO_INSTALL_DIR=/opt/intel/openvino cargo +nightly build -p wasmtime-bench-api -Zpackage-features --features wasi-nn`
2021-02-23 09:18:37 -06:00
Alex Crichton
98d3e6823f Update wasmparser/wat dependencies (#2675)
* Update wasmparser/wat dependencies

Bring in new opcodes and new instructions for SIMD

* Update module linking syntax
2021-02-22 11:56:34 -06:00
bjorn3
a710fc4425 Make Module object safe 2021-02-22 16:00:37 +01:00
Nick Fitzgerald
584d6fbf0e Merge pull request #2671 from fitzgen/issue-templates
Clean up our github issue templates
2021-02-19 13:05:04 -08:00
Nick Fitzgerald
a4a841cb6c Ensure all issue templates use Title Case 2021-02-19 10:30:28 -08:00
Nick Fitzgerald
25a9c73901 Clean up our github issue templates
* Don't use HTML comments, as they are noisy, which makes the templates more
  intimidating.

* Use "TODO" to clearly demarcate everywhere the issue reporter should fill in
  some information.

* Use headers and white space abundantly, which makes it easier to visually
  process the template and its sections at a glance, and less of an intimidating
  wall of text.

Fixes #2661
2021-02-19 09:44:19 -08:00
Pat Hickey
d60e158548 Merge pull request #2668 from bytecodealliance/pch/rename_some_wiggle_tests
rename some wiggle tests to reflect new witx ast names
2021-02-18 16:11:58 -08:00
Pat Hickey
1fe97ea31e rename some wiggle tests to reflect new witx ast names
arrays are now lists
structs are now records
unions are now variants

this ruins some of my union puns, oh well
2021-02-18 15:06:16 -08:00
Alex Crichton
cc6bde522a Update wasi-nn submodule 2021-02-18 14:45:20 -08:00
Alex Crichton
d095f63cfd Update submodules 2021-02-18 14:45:20 -08:00
Alex Crichton
136755ade2 Fix wiggle trace example 2021-02-18 14:45:20 -08:00
Alex Crichton
26e9ea433e Fix a bug in wasi 2021-02-18 14:45:20 -08:00
Alex Crichton
9ab5fa26cf Update the wasi-crypto spec 2021-02-18 14:45:20 -08:00
Alex Crichton
250f11c572 Fix build of wasi-nn 2021-02-18 14:45:20 -08:00
Alex Crichton
fa98f0bc91 Fix wiggle tests 2021-02-18 14:45:20 -08:00
Alex Crichton
df9c725fa0 Update to the next version of the witx crate
This commit updates to the 0.9 version of the witx crate implemented in
WebAssembly/wasi#395. This new version drastically changes code
generation and how we interface with the crate. The intention is to
abstract the code generation aspects and allow code generators to
implement much more low-level instructions to enable more flexible APIs
in the future. Additionally a bunch of `*.witx` files were updated in
the WASI repository.

It's worth pointing out, however, that `wasi-common` does not change as
a result of this change. The shape of the APIs that we need to implement
are effectively the same and the only difference is that the shim
functions generated by wiggle are a bit different.
2021-02-18 14:45:20 -08:00
Alex Crichton
aed6de32d4 Automatically add wasmtime-publish team while publishing (#2663)
This updates the publication script we have for crates to ensure that
the `wasmtime-publish` GitHub team is added to all crates published.
This will fail for most publications because the team is already listed,
but the hope is that whomever is publishing can see the logs and catch
anything that looks awry.
2021-02-18 12:34:48 -06:00
Max de Danschutter
445e539ae0 Disable wasmtime default-features in wasi crate (#2664) 2021-02-18 11:29:52 -06:00
Chris Fallin
c07ec4c525 Merge pull request #2653 from bjorn3/more_atomic_ops
More atomic ops
2021-02-18 08:34:58 -08:00
Chris Fallin
79bb1fc6a4 Merge pull request #2527 from bjorn3/serialize_ir
Add serde serialization support for the full clif ir
2021-02-18 08:33:50 -08:00
bjorn3
ff22842da5 More atomic ops 2021-02-18 14:16:15 +01:00
bjorn3
08f72d7084 Fix ensure_deterministic_build.sh 2021-02-18 13:53:21 +01:00
bjorn3
0693b7dade Include git rev in the version number 2021-02-18 13:01:01 +01:00
bjorn3
720da20588 Describe serialization format 2021-02-18 11:27:51 +01:00
bjorn3
a0c2276ee7 Add a version marker
This prevents deserializing a function with a different Cranelift version
2021-02-18 11:27:51 +01:00
bjorn3
71e468a954 Remove most of cranelift-serde 2021-02-18 11:27:49 +01:00
bjorn3
2fc964ea35 Add serde serialization support for the full clif ir 2021-02-18 11:27:02 +01:00
Chris Fallin
7b4652bb82 Merge pull request #2654 from kaseyc/rex
Add methods to construct RexFlags from OperandSizes.
2021-02-17 19:27:18 -08:00
Kasey Carrothers
9c3edee9d0 Add methods to construct RexFlags from OperandSizes.
This unifies the logic around Rex prefix emission and hopefully makes REX prefix errors less likely.
There are still several instructions that use other sources to determine the flags, so set_w and clear_w are left as is.

Additional cleanups:
  * Change always_emit_if_8bit_needed to take a Reg instead of a u8 for type safety.
  * Deduplicated emission code in MovRM.
2021-02-17 18:48:05 -08:00
Dan Gohman
8d90ea0390 Bump version to 0.23.0
I used a specially modified version of the publish script to avoid
bumping the `witx` version.
2021-02-17 15:35:43 -08:00
Pat Hickey
38b63f525e Merge pull request #2658 from Daniel-Liu-c0deb0t/anytrue-type
Specified type for V128AnyTrue
2021-02-16 17:30:37 -08:00
c0deb0t
fdd6bcae2e Specified type for V128AnyTrue 2021-02-16 15:13:23 -08:00
Dan Gohman
285a7feb19 128-bit operations are only for the new x64 backend. 2021-02-16 14:10:05 -08:00
Dan Gohman
64002cb0e9 Add release notes for a 0.23.0 release. 2021-02-16 14:10:05 -08:00
Dan Gohman
3ed46e47e9 Supress a warning in lightbeam. 2021-02-16 14:10:05 -08:00
Chris Fallin
e5267f056f Update rand dependency to 0.8.3. 2021-02-16 14:10:05 -08:00
Chris Fallin
8cd64e3ec6 Fix warnings (causing CI failures) with new Rust beta.
- Panic messages must now be string literals (we used `format!()` in
  many places; `panic!()` can take format strings directly).
- Some dead enum options with EVEX encoding stuff in old x86 backend.
  This will go away soon and/or be moved to the new backend anyway, so
  let's silence the warning for now.
- A few other misc warnings.
2021-02-16 14:10:05 -08:00
Dan Gohman
d0e5d347b1 Update to rand_core 0.6.2.
See https://rustsec.org/advisories/RUSTSEC-2021-0023
2021-02-16 14:10:05 -08:00
Dan Gohman
b396f6dc6f Switch from memmap to memmap2.
See https://rustsec.org/advisories/RUSTSEC-2020-0077
2021-02-16 14:10:05 -08:00
Dan Gohman
d598883f3a Switch from term to termcolor.
See https://rustsec.org/advisories/RUSTSEC-2018-0015
2021-02-16 14:10:05 -08:00
Alex Crichton
09b976e1d5 Fix a number of warnings on nightly Rust (#2652)
This fixes some issues that are cropping up where some syntax will get
phased out in 2021
2021-02-11 12:42:45 -06:00
Pat Hickey
9abae356e0 fix! 2021-02-10 16:54:14 -08:00
Pat Hickey
bc95864202 wasi-tests: add path_exists test
this *should* reproduce the report at
https://github.com/bytecodealliance/wasmtime/issues/2642 but it does
not, so the problem has something to do with invoking via wasmtime cli?
2021-02-10 16:54:14 -08:00
Pat Hickey
c9d8ed03c9 wasi-common: fix fdstat of dirfd
the fdstat of a dirfd needs to include both the file and dir rights in
the inheriting field.

The wasi-libc path_open bases the base rights of child directories off
the inheriting rights of the parent, so if we only put file rights in
there, opening a child directory will not have any directory operations
permitted.

Fixes https://github.com/bytecodealliance/wasmtime/issues/2638
2021-02-10 16:53:39 -08:00
Nick Fitzgerald
ab811d7445 Merge pull request #2648 from alexcrichton/tweak-fuel-c-api
Tweak C API for fuel
2021-02-09 09:26:14 -08:00
Alex Crichton
de27fbe20f Tweak C API for fuel
* Ensure `store` is in the function names
* Don't abort the process on `add_fuel` when fuel isn't configured
* Allow learning about failure in both `add_fuel` and `fuel_consumed`
2021-02-09 07:19:22 -08:00
Alex Crichton
5b55ba8053 Use sigsetjmp instead of setjmp (#2645)
Apparently on macOS `setjmp` manipulates the process-wide signal mask
which adds a good deal of overhead. We don't actually need this
functionality so this commit switches to using the `sig` version of
setjmp/longjmp where we can explicitly ask the signal mask to not get
preserved. This came out of poking around on #2644 and on macOS locally
thi sdropped the overhead from 721ns to 55ns.
2021-02-08 12:05:11 -06:00
Shu
8ee0f09983 Add fuel related functions to c-api (#2643)
Co-authored-by: Shu <me@wadza.fr>
2021-02-08 10:03:25 -06:00
Pat Hickey
1fe58fe9a4 Merge pull request #2641 from bytecodealliance/pch/fix_wasi_ctx_build
WasiCtx: default to empty/sink stdio files rather than throw
2021-02-05 18:39:15 -08:00
Pat Hickey
e4ce04bab4 WasiCtx: default to empty/sink stdio files rather than throw
the test harness now uses the empty stdin file. I tested manually that
the sink stdout & stderr files work, but theres no test in tree at the
moment
2021-02-05 17:50:20 -08:00