Commit Graph

3474 Commits

Author SHA1 Message Date
losfair
e0e7d58313 Make state mapping work on non-x86 architectures. 2019-10-07 23:00:37 +08:00
losfair
80d6c4cbc0 Implement get_fault_info for aarch64. 2019-10-06 18:27:35 +08:00
losfair
b304317682 More mov variants. 2019-09-30 01:01:15 +08:00
losfair
89d8b5a41c Fixes for aarch64. 2019-09-28 17:31:10 +08:00
losfair
3dadbc15c9 Integer subset done. 2019-09-23 22:30:08 +08:00
losfair
a124d87d0f Fix Operator::MemorySize. 2019-09-19 01:10:23 +08:00
losfair
5f8b289751 movzx/movsx 2019-09-19 01:04:20 +08:00
losfair
8a91f801b9 Fix return from homomorphic host redirection trampoline. 2019-09-18 21:47:31 +08:00
losfair
72b6123def Fix memory grow 2019-09-18 02:38:35 +08:00
losfair
e40600533e Add missing emit_mov variants. 2019-09-18 02:30:45 +08:00
losfair
97b75d0124 Ensure callee-saved registers are properly preserved. 2019-09-18 02:21:35 +08:00
losfair
b57aba4ae7 Add homomorphic host redirection abstraction for vm->host calls. 2019-09-18 02:14:13 +08:00
losfair
574e4c477f Print return value from pure WASM binary. 2019-09-17 00:54:34 +08:00
losfair
d8b313e3fd Fix emit_lea. 2019-09-17 00:49:21 +08:00
losfair
05557fc9ad Bump dynasm to v0.5.1 2019-09-16 23:46:10 +08:00
losfair
96163a07a6 Temporarily disable all lints in runtime-core. 2019-09-15 18:33:53 +08:00
losfair
2af69f6710 Fixed compilation on aarch64. 2019-09-15 18:32:02 +08:00
losfair
9b77677e4b Relax constraints a bit to compile on aarch64. 2019-09-15 18:23:42 +08:00
losfair
d3227f830c More instructions & aarch64 trampolines. 2019-09-15 17:57:40 +08:00
losfair
ce7c903c23 Add impl for more instructions for aarch64 translator. 2019-09-11 01:13:52 +08:00
losfair
4210715070 AArch64 translation module. 2019-09-07 01:32:21 +08:00
bors[bot]
20a0afa6a5
Merge #756
756: feat(runtime-c-api) Allow to call `wasmer_export_func_call` with null inputs and a 0 arity r=syrusakbary a=Hywan

Fix #753 

This PR allows to call `wasmer_export_func_call` with inputs set to NULL, and an arity of 0. It avoids to create an empty inputs array. So basically:

```c
wasmer_export_func_call(exported_function, NULL, 0, …, …);
```

instead of:

```c
wasmer_value_t inputs = {};
wasmer_export_func_call(exported_function, inputs, 0, …, …);
```

This PR also updates the test suite for exports. Instead of just the famous `sum` function, we now test more functions, so that all Wasm types are covered, including void functions.

Finally, this PR updates the `wasmer_export_func_call` signature to forbid negative arities.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-09-06 11:56:45 +00:00
Ivan Enderlin
1f1ecb7e00 test(runtime-c-api) Use calloc and simplify code. 2019-09-06 10:20:36 +02:00
Ivan Enderlin
a67ce539ef test: Fix CS. 2019-09-05 15:10:09 +02:00
Ivan Enderlin
86ec75fd98 chore(runtime-c-api) Update C & C++ headers. 2019-09-05 15:09:21 +02:00
Ivan Enderlin
a2343f9f0d test(runtime-c-api) Fully test all kind of exports. 2019-09-05 15:08:23 +02:00
Ivan Enderlin
2d63e25075 feat(runtime-c-api) Arity cannot be negative when calling wasmer_export_func_call. 2019-09-05 14:31:43 +02:00
bors[bot]
15066555e7
Merge #726
726: Add serialization for WASI state  r=MarkMcCaskey a=MarkMcCaskey

part of #700 

Due to the trait objects from #583 , we can't use `serde` derive for this or use serde traits directly, we have to do some custom serialization (edit: luckily there's a crate for this: `typetag`)

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2019-09-04 23:08:10 +00:00
Mark McCaskey
7a9afbffe9
Merge branch 'master' into feature/serialization-of-wasi-state 2019-09-04 14:36:25 -07:00
Syrus Akbary
7b1ab0c461
Merge pull request #750 from wasmerio/feature/doc-ci
Build API documentation with cargo doc.
2019-09-03 17:11:10 -07:00
Syrus Akbary
f68ad7f655
Merge pull request #751 from wasmerio/feature/better-docs
Improved docs with custom logo and favicon
2019-09-03 17:09:23 -07:00
Syrus
d8471e2b6a Improved docs with custom logo and favicon 2019-09-03 17:06:31 -07:00
Nick Lewycky
f785fe2e95 Add 'docs' to .PHONY.
Fixes Makefile claiming that 'docs' is up to date because it thinks we're
asking it to build 'docs' directory instead of simply running cargo for us.
2019-09-03 16:18:02 -07:00
Nick Lewycky
5f1de897ad Don't redefine "variables". 2019-09-03 16:13:50 -07:00
Nick Lewycky
f55e58936d Build API documentation with cargo doc. 2019-09-03 16:12:30 -07:00
Syrus Akbary
e98ac29b32
Merge pull request #749 from wasmerio/nlewycky/fuzz-cleanup
cargo fmt + adjust comment.
2019-09-03 15:33:57 -07:00
Syrus
1a35cdd4cd Trying to improve local cache dir 2019-09-03 15:32:32 -07:00
Nick Lewycky
4ce2e2c56d cargo fmt + adjust comment. 2019-09-03 15:26:48 -07:00
Syrus
d54712f73b Fix azure linting 2019-09-03 14:56:29 -07:00
Syrus
7fc8ac84a8 Add sccache directory cache just in case 2019-09-03 14:55:26 -07:00
bors[bot]
688d0a2015
Merge #741
741: add validate_wasm fuzzer r=syrusakbary a=pventuzelo

useful to fuzz validation mechanism and wasmparser library.

Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
Co-authored-by: Patrick Ventuzelo <9038181+pventuzelo@users.noreply.github.com>
2019-09-03 21:15:06 +00:00
Syrus Akbary
80c1359c84
Merge pull request #747 from pventuzelo/pventuzelo/724-fix-panics-execute-wasm
[fix issue #724] replace panic! with return Err()
2019-09-03 10:42:47 -07:00
Patrick Ventuzelo
7dd496c490
Update src/bin/wasmer.rs
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
2019-09-03 17:06:56 +02:00
Patrick Ventuzelo
cdba7e55e5
Update src/bin/wasmer.rs
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
2019-09-03 17:06:37 +02:00
Patrick Ventuzelo
7680c0ea52
Merge branch 'master' into ventuzelo/validate-wasm-fuzzer 2019-09-03 11:03:27 +02:00
Patrick Ventuzelo
6701241267
Merge branch 'master' into pventuzelo/724-fix-panics-execute-wasm 2019-09-03 11:03:12 +02:00
Syrus Akbary
777833ee05
Merge pull request #743 from wasmerio/dependabot/cargo/cbindgen-0.9.1
Bump cbindgen from 0.9.0 to 0.9.1
2019-09-02 10:23:44 -07:00
Syrus Akbary
fb097f150b
Merge pull request #745 from wasmerio/dependabot/cargo/winapi-0.3.8
Bump winapi from 0.3.7 to 0.3.8
2019-09-02 10:23:19 -07:00
Syrus Akbary
19cd7728f0
Merge pull request #491 from wasmerio/add-debugging-doc
add beginnings of debugging document
2019-09-02 10:22:17 -07:00
Patrick Ventuzelo
4406fbb6f3 replace panics with return Err() 2019-09-02 12:12:35 +02:00