Commit Graph

365 Commits

Author SHA1 Message Date
dcc0164698 Release 3.0.0 2022-11-20 17:00:03 +01:00
91c2c1daea Release 3.0.0-rc.4 2022-11-19 16:21:42 +01:00
820b83e56b Update 3.0.0-rc.2 -> 3.0.0-rc.3 2022-11-18 19:50:41 +01:00
3a092cf6f9 Make "make lint" pass for Rust 1.63 2022-11-18 00:43:54 +08:00
ecc0c9e547 Limit the use of clone when handling Compilation object 2022-11-09 13:23:44 +01:00
d2364f40bb Update versions via script 2022-11-02 14:52:12 +01:00
8ee578fb5d Update package versions 2022-10-25 12:54:45 +02:00
fef756412f Update 3.0.0-beta -> 3.0.0-beta.2 2022-09-26 12:20:35 +02:00
c570b1471a Bump version to 3.0.0-beta in Cargo manifests 2022-08-08 19:56:35 +03:00
011d36829a Bump 3.0.0-alpha.3 to 3.0.0-alpha.4 2022-07-30 11:31:08 +03:00
1c3ffffe46 Bump 3.0.0-alpha.2 to 3.0.0-alpha.3 2022-07-30 11:30:45 +03:00
02ee80cf10 Bump version to 3.0.0-alpha.2 2022-07-30 11:30:07 +03:00
6c045bff10 Bump version to 3.0.0-alpha.1 to fix botched compiler crate 2022-07-30 11:29:41 +03:00
8959008403 Update version to 3.0.0-alpha 2022-07-30 11:29:05 +03:00
e19e0e6633 Removed debug leftover 2022-07-29 18:14:00 +02:00
0c94003cd3 Fixed linter 2022-07-29 16:43:22 +02:00
b39e681c63 Updated Crenelift to v0.86.1 2022-07-29 16:34:57 +02:00
4384ddf9cd Improved EngineBuilder and Store API
- Store::new() now takes an impl Into<Engine>.
- Added Into<Engine> impls in each of the compilers
- Updated docs/migration_to_3.0.0.md on API usage
2022-07-28 15:20:26 +03:00
214346af3b Merge Backend into EngineBuilder and refactor feature flags 2022-07-27 21:03:24 +03:00
4a06b1d3f6 Rename engine's Universal type to Backend
The Universal type was essentially a builder of engines that's given a
compiler backend and creates an Engine with .engine() method. The name
was not clear.
2022-07-25 13:23:13 +03:00
187d2e6364 Remove Artifact trait
In favor of using UniversalArtifact everywhere
2022-07-25 13:13:52 +03:00
a419ccdf52 Move Webassembly objects to Store and remove Context
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
f16bd35d3c Remove old ref-counted extern support from compiler-cranelift
It was never fully implemented and we're moving to a different way of
tracking ExternRef lifetimes.
2022-07-19 15:31:51 +03:00
f744bac1a2 Store: replace new() with new_with_engine() and make new() take CompilerConfig
Since there's one engine now, it doesn't make sense to initialize a
`Store` with the engine specifically. It's an extra redundant step for
the API user.
2022-06-16 16:57:45 +03:00
8f539d134b Move wasmer_compiler/{address_map, function, module, sourceloc, trap, unwind}.rs to wasmer_types 2022-06-16 16:57:45 +03:00
b1f1939bf7 Move wasmer_compiler/{section,relocation}.rs to wasmer_types 2022-06-16 16:57:45 +03:00
feee4e3587 Move wasmer_compiler errors to wasmer_types error module 2022-06-16 16:57:45 +03:00
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
44a80604ab compiler-cranelift: Fix typo in enum variant 2022-06-14 11:15:00 +03:00
5339f7cdae Fix clippy lints
Fixes: #2926
2022-06-09 16:05:53 +02:00
00f9a3c8d7 Remove loupe dependency
Closes #2731
Closes #2744
2022-06-08 14:12:49 +03:00
33654c1a1d Release version 2.3.0 2022-06-06 22:27:57 +03:00
3d5415dcb9 Added cranelift to build-wasmer-wasm 2022-05-24 16:33:11 +02:00
1607a02535 Make linter happy 2022-05-24 16:33:11 +02:00
b5d7f11d20 Make rayon optional in cranelift compiler 2022-05-24 16:33:11 +02:00
3d7ae9e21f Moved LibCall enum to wasmer_types, and compiler is no longer dependant of wasmer_vm 2022-05-03 09:32:34 +02:00
77af8ba634 Fix some clippy lints
Before:
```
% make lint 2>&1 | grep warnings | sort | uniq
error: could not compile `wasmer-cli` due to previous error; 25 warnings emitted
warning: `compiler-test-derive` (lib) generated 8 warnings
warning: `test-generator` (lib) generated 4 warnings
warning: `wasi-test-generator` (bin "wasi-test-generator") generated 8 warnings
warning: `wasmer-cache` (lib) generated 4 warnings
warning: `wasmer-cli` (lib) generated 25 warnings
warning: `wasmer-compiler-cranelift` (lib) generated 50 warnings
warning: `wasmer-compiler-singlepass` (lib) generated 228 warnings
warning: `wasmer-compiler` (lib) generated 3 warnings
warning: `wasmer-emscripten` (lib) generated 182 warnings
warning: `wasmer-engine-dummy` (lib) generated 6 warnings
warning: `wasmer-engine-dylib` (lib) generated 37 warnings
warning: `wasmer-engine-staticlib` (lib) generated 16 warnings
warning: `wasmer-engine-staticlib` (lib) generated 7 warnings
warning: `wasmer-engine-universal` (lib) generated 11 warnings
warning: `wasmer-engine` (lib) generated 15 warnings
warning: `wasmer-object` (lib) generated 5 warnings
warning: `wasmer-types` (lib) generated 31 warnings
warning: `wasmer-vfs` (lib) generated 4 warnings
warning: `wasmer-vm` (lib) generated 40 warnings
warning: `wasmer-wasi-experimental-io-devices` (lib) generated 11 warnings
warning: `wasmer-wasi-types` (lib) generated 3 warnings
warning: `wasmer-wasi` (lib) generated 13 warnings
warning: `wasmer-wast` (lib) generated 11 warnings
warning: `wasmer` (lib) generated 54 warnings
```

After:
```
warning: `wasmer-cli` (lib) generated 16 warnings
warning: `wasmer-compiler-cranelift` (lib) generated 48 warnings
warning: `wasmer-compiler-singlepass` (lib) generated 213 warnings
warning: `wasmer-emscripten` (lib) generated 170 warnings
warning: `wasmer-engine-dummy` (lib) generated 6 warnings
warning: `wasmer-engine-dylib` (lib) generated 4 warnings
warning: `wasmer-engine-staticlib` (lib) generated 14 warnings
warning: `wasmer-engine-staticlib` (lib) generated 5 warnings
warning: `wasmer-engine-universal` (lib) generated 9 warnings
warning: `wasmer-engine` (lib) generated 12 warnings
warning: `wasmer-object` (lib) generated 3 warnings
warning: `wasmer-types` (lib) generated 7 warnings
warning: `wasmer-vm` (lib) generated 36 warnings
warning: `wasmer-wasi-experimental-io-devices` (lib) generated 6 warnings
warning: `wasmer-wasi-types` (lib) generated 3 warnings
warning: `wasmer-wasi` (lib) generated 9 warnings
warning: `wasmer-wast` (lib) generated 9 warnings
warning: `wasmer` (lib) generated 42 warnings
```
2022-04-20 18:25:04 +03:00
4c946257cf Update Cranelift to 0.82 2022-04-06 16:23:32 +01:00
3ad9552e2e Update wasmparser to 0.83 2022-04-06 16:23:32 +01:00
fc794ab4e3 Merge #2807
2807: Run Wasm code on a separate stack r=Amanieu a=Amanieu

This uses the [corosensei](https://crates.io/crates/corosensei) crate to
run Wasm code on a separate stack from the main thread stack.

In trap handlers for stack overflows and memory out of bounds accesses,
we can now check whether we are executing on the Wasm stack and reset
execution back to the main thread stack when returning from the trap
handler.

When Wasm code needs to perform an operation which may modify internal
data structures (e.g. growing a memory) then execution must switch back
to the main thread stack using on_host_stack. This is necessary to avoid
leaving internal data structure in an inconsistent state when a stack
overflow happens.

In the future, this can also be used to suspend execution of a Wasm
module (#1127) by modeling it as an async function call.

Fixes #2757
Fixes #2562


Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2022-03-16 13:24:50 +00:00
fe9d2d8d22 Release version 2.2.1 2022-03-15 11:02:31 +00:00
657bbae518 Remove the custom probestack trampoline in compiler-cranelift
This is now handled by the generic trampoline code in the engine.
2022-03-14 22:14:22 +00:00
4dd1634218 Release version 2.2.0 2022-02-28 17:19:14 +00:00
15f9d2646f Release version 2.2.0-rc1 2022-02-15 19:10:24 +00:00
4e27e1164c Release version 2.2.0-rc1 2022-01-27 23:59:27 +00:00
ffb9cd33b9 Use trampolines for all libcalls in engine-universal and engine-dylib
In both of these engines, the compiled code may be loaded in memory far
from the Wasmer runtime which means that libcalls may not be reachable
through the normal relocation types. Instead a trampoline is needed to
allow reaching any address in the 64-bit address space.

In the case of engine-dylib, this is even worse since the symbols are
not exported by the executable without some special linker flags. The
solution here is to manually patch in the addresses at load time into
a data table of function pointers.
2022-01-20 11:47:20 +00:00
fb7a572415 Use exact version for Wasmer crate dependencies
We don't guarantee API compatibility between internal Wasmer crates when
making minor version bumps.
2022-01-19 21:35:09 +00:00
ebcea4a5c4 Release v2.1.1 2021-12-21 12:19:50 +01:00
c650ffea33 Version 2.1.0 2021-11-30 23:46:54 +00:00
8f2e49d528 Merge #2693
2693: Add extra validation to compilers & engines r=ptitSeb a=Amanieu

- Cranelift and singlepass now properly cross-compile with no dependency on the host target.
- Staticlib engine now panics if you try to run a freshly compiled module.
- CPU features used when a module was compiled are now checked against the host CPU features during instantiation.

Fixes #1567
Fixes #2590 

Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2021-11-23 19:48:25 +00:00