Commit Graph

33 Commits

Author SHA1 Message Date
Dan Gohman
325e973474 Update faerie to 0.12 to finish the target-lexicon update story. 2019-11-06 17:00:00 -08:00
Peter Huene
ab80785c05 Bump Cranelift to 0.49.0 and target-lexicon to 0.9.0. (#499)
This commit bumps Cranelift to 0.49.0 and target-lexicon to 0.9.0 to fix the
failing build to due an updated faerie crate that violated semver with an
updated 0.9.0 target-lexicon dependency.

Fixes #491.
2019-11-06 15:30:54 -08:00
Josh Triplett
56ce6e9c9f Migrate from failure to thiserror and anyhow (#436)
* Migrate from failure to thiserror and anyhow

The failure crate invents its own traits that don't use
std::error::Error (because failure predates certain features added to
Error); this prevents using ? on an error from failure in a function
using Error. The thiserror and anyhow crates integrate with the standard
Error trait instead.

This change does not attempt to semantically change or refactor the
approach to error-handling in any portion of the code, to ensure that
the change remains straightforward to review. Modules using specific
differentiated error types move from failure_derive and derive(Fail) to
thiserror and derive(Error). Modules boxing all errors opaquely move
from failure::Error to anyhow. Modules using String as an error type
continue to do so. Code using unwrap or expect continues to do so.

Drop Display implementations when thiserror can easily derive an
identical instance.

Drop manual traversal of iter_causes; anyhow's Debug instance prints the
chain of causes by default.

Use anyhow's type alias anyhow::Result<T> in place of
std::result::Result<T, anyhow::Error> whenever possible.

* wasm2obj: Simplify error handling using existing messages

handle_module in wasm2obj manually maps
cranelift_codegen::isa::LookupError values to strings, but LookupError
values already have strings that say almost exactly the same thing.
Rely on the strings from cranelift.

* wasmtime: Rely on question-mark-in-main

The main() wrapper around rmain() completely matches the behavior of
question-mark-in-main (print error to stderr and return 1), so switch to
question-mark-in-main.

* Update to walrus 0.13 and wasm-webidl-bindings 0.6

Both crates switched from failure to anyhow; updating lets us avoid a
translation from failure to anyhow within wasmtime-interface-types.
2019-11-04 20:43:25 -08:00
Nick Fitzgerald
842faf5aa6 Support for multi-value wasm (#399)
* deps: bump wasmparser to 0.39.2

This has a bug fix for multi-value Wasm validation that is required for getting
the spec tests passing.

https://github.com/yurydelendik/wasmparser.rs/pull/135

* Update cranelift to 0.46.1 to get multi-value Wasm support

The `cranelift_wasm` APIs had to change a little bit to maintain state necessary
when translating multi-value Wasm blocks. The `translate_module` function now
returns a `ModuleTranslationState` that is borrowed during each function's
translation.

* Enable multi-value proposal's spec tests

This enables all the Wasm multi-value proposal's spec tests other than the ones
that rely on functions having more return values than registers available on the
target. That is not supported by cranelift yet.

* wasmtime-interface-types: always use multi-value Wasm

And remove the return pointer hacks that work around the lack of multi-value.
2019-10-17 17:12:01 -07:00
Dan Gohman
fd3efad781 Various clippy fixes. (#403) 2019-10-09 13:32:52 -07:00
Dan Gohman
8e1b44b29c Make more code work with no_std. (#407)
* Make more code work with no_std.

no_std support is still incomplete, but this patch takes care of the
bulk of the straightforward parts.
2019-10-08 16:53:32 -07:00
Dan Gohman
10845134f7 Update to latest walrus, wasmparser, and wasm-webidl-bindings. 2019-09-26 12:34:58 -07:00
Artur Jamro
134bf467e7 Update cranelift to 0.44.0 2019-09-25 13:04:10 -07:00
Nick Fitzgerald
1848cc0868 deps: Update cranelift-* to 0.43.1 2019-09-25 13:04:10 -07:00
Artur Jamro
fad70eb8bb Refactor usage of SecondaryMap impls (serde, PartialEq) 2019-09-05 17:14:32 -07:00
Dan Gohman
44367ba99a Bump version to 0.2.0 2019-08-20 16:07:57 -07:00
Yury Delendik
b4a505d5d3 Generate simulated DWARF for rest of the functions 2019-08-20 14:24:13 -07:00
Artur Jamro
7009c8dd73 Add dyn to traits and bump Rust version 2019-08-16 13:46:09 -07:00
Yury Delendik
4f04d7d873 Transform ranges and simple expressions (#63) 2019-08-08 20:44:45 -07:00
Yury Delendik
5fc2d827b7 Update cranelift requirement from 0.37.0 to 0.38.0 (#254)
closes #248, closes #249, closes #250, closes #251, closes #252
2019-08-06 14:49:28 -05:00
Yury Delendik
0bc9d1fe6f Update cranelift to 0.37.0 (#236)
Closed #228, #227, #226, #225, #224
2019-08-01 20:46:34 -05:00
dependabot-preview[bot]
4767af276b Update wasmparser requirement from 0.34.0 to 0.35.1 (#233)
Updates the requirements on [wasmparser](https://github.com/yurydelendik/wasmparser.rs) to permit the latest version.
- [Release notes](https://github.com/yurydelendik/wasmparser.rs/releases)
- [Commits](https://github.com/yurydelendik/wasmparser.rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-31 09:20:12 -05:00
Artur Jamro
165dc4944d Simple module compilation cache (#203)
* Simple module compilation cache

* Fix base64 encoding bug

* Use warn! everywhere in cache system

* Remove unused import

* Temporary workaround for long path on Windows

* Remove unused import for non-windows builds

* Add command line argument to enable cache system + apply minor review feedback
2019-07-25 16:16:10 -07:00
dependabot-preview[bot]
5164994ce1 Update wasmparser requirement from 0.32.1 to 0.34.0 (#215)
Updates the requirements on [wasmparser](https://github.com/yurydelendik/wasmparser.rs) to permit the latest version.
- [Release notes](https://github.com/yurydelendik/wasmparser.rs/releases)
- [Commits](https://github.com/yurydelendik/wasmparser.rs/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-23 15:03:42 -07:00
Dan Gohman
19e4f42d50 Fix compilation of wasmtime-environ from within wasmtime-jit. (#201)
* Fix compilation of wasmtime-environ from within wasmtime-jit.

Enable wasmtime-environ/std when wasmtime-jit's std feature is enabled.

Fixes #200.

* Fix wasmtime-debug build too.
2019-07-19 11:01:27 -07:00
Yury Delendik
d27d190b74 reverse dependency
https://github.com/CraneStation/wasmtime/pull/186#discussion_r302780035
2019-07-16 17:15:02 -07:00
Yury Delendik
748abd97d6 https://github.com/CraneStation/wasmtime/pull/186#discussion_r302781231 2019-07-16 17:15:02 -07:00
Yury Delendik
5362bd1a23 Improve performance of BTreeMap::search().last() 2019-07-16 17:15:02 -07:00
Yury Delendik
cafe821f24 Properly collect/identify used DWARF entries. 2019-07-16 17:15:02 -07:00
Yury Delendik
efe9dd7b86 Update gimli version; refactor debug data structures 2019-07-16 17:15:02 -07: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
Yury Delendik
fb9d6061e4 Update cranelift, faerie, target-lexicon and wasmparser deps 2019-07-02 14:07:30 -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
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
Yury Delendik
2353be95e6 update cranelift deps to 0.30.0 2019-03-27 02:24:51 -07:00
Yury Delendik
94ca967d0a Update faerie to 0.9.1 2019-03-27 02:24:51 -07:00
Dan Gohman
db0abe8431 Move the wasmtime crate directories form lib/* to wasmtime-*.
This follows a similar change to Cranelift made here:

https://github.com/CraneStation/cranelift/pull/660
2019-03-20 11:30:28 -07:00