Manos Pitsidianakis
14ee38a24e
compiler: move Symbol, SymbolRegistry to wasmer-types
2022-08-02 15:45:28 +03:00
Manos Pitsidianakis
214346af3b
Merge Backend into EngineBuilder and refactor feature flags
2022-07-27 21:03:24 +03:00
Manos Pitsidianakis
b15e8c2e4e
Refactor last traces of "Universal" nomenclature
2022-07-25 13:23:16 +03:00
Manos Pitsidianakis
187d2e6364
Remove Artifact trait
...
In favor of using UniversalArtifact everywhere
2022-07-25 13:13:52 +03:00
Manos Pitsidianakis
086205bfcc
Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
a6173f9746
Remove wasmer-{artifact,engine} and merge it into wasmer-compiler and wasmer-vm
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
8f539d134b
Move wasmer_compiler/{address_map, function, module, sourceloc, trap, unwind}.rs to wasmer_types
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
b1f1939bf7
Move wasmer_compiler/{section,relocation}.rs to wasmer_types
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
feee4e3587
Move wasmer_compiler errors to wasmer_types error module
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
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
Amanieu d'Antras
4c946257cf
Update Cranelift to 0.82
2022-04-06 16:23:32 +01:00
Amanieu d'Antras
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
ptitSeb
b54780cdab
feat(compiler) Refactor the new ARM Reloc and Trampoline to avoid a &mut
2021-10-12 10:11:36 +02:00
ptitSeb
20f0c66fe6
feat(compiler) Added Trampolines and more Relocations for Arm64 (llvm-universal on linux-aarch64 are OK now)
2021-10-05 14:08:55 +02:00
Syrus Akbary
92f8141421
[compiler] simplified codebase (we can factor this out)
2021-07-16 16:34:16 -07:00
Syrus Akbary
9be59f809f
Use FunctionBinaryReader instead of Middleware
2021-04-26 16:40:54 -07:00
Simon Warta
df74a4812c
Create dedicated MiddlewareError
2020-12-23 00:07:00 +01:00
Simon Warta
bb5c4cd704
Remove to_wasm_error
2020-12-22 09:17:09 +01:00
Simon Warta
9da5f5b5d0
Deprecate to_wasm_error
2020-12-22 09:17:03 +01:00
losfair
e7dd725c6d
Add module info transformation method to ModuleMiddleware.
2020-11-20 14:34:46 -08:00
Mark McCaskey
5049c543dc
Rename wasm-common crate to wasmer-types
2020-08-13 17:59:26 -07:00
Nick Lewycky
2c2da8ec3c
Wire up experimental_native_compile_module for LLVM.
...
Move Symbol and SymbolRegistry to wasmer_compiler crate.
2020-08-05 17:44:52 -07:00
Ivan Enderlin
6df0645ab9
fix(compiler) Make it work without std.
...
This patch uses our `lib` module that builds an `std` module depending
of the `core` or `std` feature flag.
2020-07-23 15:09:46 +02:00
Nick Lewycky
635f8a4284
Remove references to non-existant clippy.toml.
2020-07-10 14:49:37 -07:00
Syrus
e062e87d8b
Refactored Compilers
2020-06-17 19:17:06 -07:00
losfair
0ecaac5f70
Export required types.
2020-06-17 01:43:24 +08:00
losfair
69ce68c31a
Merge remote-tracking branch 'origin/master' into middleware
2020-06-17 00:52:20 +08:00
losfair
c413101f99
Remove middleware registry.
2020-06-16 00:56:18 +08:00
losfair
1337a71753
Middleware builders.
2020-06-13 00:55:16 +08:00
Syrus
ff8f3c8948
Autodetect endianness based on target triple
2020-06-11 00:31:04 -07:00
Syrus
eaf85c2bfe
Added partial support for EH_FRAME in Cranelift for unwind
2020-06-10 20:44:44 -07:00
Syrus
803c896946
Merge branch 'master' into cranelift-update
...
# Conflicts:
# lib/compiler-cranelift/Cargo.toml
# lib/compiler-cranelift/src/debug/mod.rs
# lib/compiler-cranelift/src/lib.rs
# lib/compiler/src/unwind.rs
# lib/engine-jit/src/code_memory.rs
# lib/engine-jit/src/function_table.rs
# lib/engine-jit/src/lib.rs
# lib/wasm-common/Cargo.toml
2020-06-09 18:44:41 -07:00
Syrus
0ee70d3579
Added base MiddlewareBinaryReader
2020-06-08 12:41:44 -07:00
Syrus
fa6de35944
Added support for custom cpu features
2020-06-04 15:50:03 -07:00
Syrus
cca551be4a
Added first compiler target iteration
2020-06-04 13:21:08 -07:00
Nick Lewycky
04f2db1b82
Export wptype_to_type from wasmer_compiler.
...
Also fix up its error message when it fails.
Use it in compiler-llvm and remove one of compiler-llvm's copies of this function.
2020-06-02 15:45:31 -07:00
Ivan Enderlin
e3899045a1
feat(compiler) Simplify wasmparser re-export.
2020-05-25 11:15:21 +02:00
Nick Lewycky
6995f2a7c7
Fix the build.
...
Use crate::lib::std instead of crate::std.
Add 'borrow' to crate::lib.
HashMap doesn't appear in crate::lib at all, and only place it's used is lib/compiler/src/translator which has other plain std:: uses, so don't try to no_std that file.
2020-05-20 11:06:43 -07:00
Ivan Enderlin
25f3cc53bc
Merge pull request #32 from Hywan/fix-compiler-no-default-features
...
fix(compiler) Fix features
2020-05-20 14:26:35 +02:00
Syrus
09e057338a
Renamed Module to ModuleInfo
2020-05-19 18:47:50 -07:00
Ivan Enderlin
f9ae55d5d0
fix(compiler) std and core are mutually exclusive features.
2020-05-19 09:44:18 +02:00
Ivan Enderlin
40eea02af6
fix(compiler) Make it compile with no_std + core.
2020-05-19 09:36:25 +02:00
Ivan Enderlin
63f5cd5302
fix(compiler) Make it compile with or without std.
2020-05-19 09:24:16 +02:00
Ivan Enderlin
3833a68e89
fix(compiler) Declare the wasmparser module if translator feature is enabled.
2020-05-18 20:26:58 +02:00
Syrus
8ccf7057fa
Make cranelift happy
2020-05-04 21:34:38 -07:00
Syrus
759561e0c5
Expose Compiler and CompilerConfig only on translator mode
2020-05-03 21:28:35 -07:00
Syrus
8b2a4495df
Move WasmError to root compiler
2020-05-03 21:06:42 -07:00
Nick Lewycky
db72d19f5d
Add SectionBody which holds the bytes of a section.
...
Wire it up to CompiledModule::new().
2020-05-03 15:29:00 -07:00
Syrus
c1c06591a0
Refactored FunctionBody into compiler
2020-05-01 16:51:47 -07:00
Syrus
baf5e04f6b
Merge branch 'master' into frame-info
...
# Conflicts:
# lib/compiler/src/function.rs
# lib/compiler/src/lib.rs
2020-05-01 11:50:34 -07:00