Commit Graph

3466 Commits

Author SHA1 Message Date
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
Patrick Ventuzelo
afa6d6f52c
[formatting] add new line validate_wasm.rs 2019-09-02 11:14:40 +02:00
Patrick Ventuzelo
9ba77aa1fc
[formating] add new line Cargo.toml 2019-09-02 11:14:05 +02:00
dependabot-preview[bot]
616b768529
Bump winapi from 0.3.7 to 0.3.8
Bumps [winapi](https://github.com/retep998/winapi-rs) from 0.3.7 to 0.3.8.
- [Release notes](https://github.com/retep998/winapi-rs/releases)
- [Commits](https://github.com/retep998/winapi-rs/compare/0.3.7...0.3.8)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 09:11:48 +00:00
dependabot-preview[bot]
8a2017cce3
Bump cbindgen from 0.9.0 to 0.9.1
Bumps [cbindgen](https://github.com/eqrion/cbindgen) from 0.9.0 to 0.9.1.
- [Release notes](https://github.com/eqrion/cbindgen/releases)
- [Changelog](https://github.com/eqrion/cbindgen/blob/master/CHANGES)
- [Commits](https://github.com/eqrion/cbindgen/compare/v0.9.0...v0.9.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-02 09:11:25 +00:00
Patrick Ventuzelo
f0bd680343 validate_wasm fuzzer 2019-09-02 11:08:40 +02:00
Syrus
8965314529 Trying to fix pipelines 2019-09-01 11:15:35 -07:00
Syrus
4c2e5eddf7 Fix LLVM on Windows 2019-09-01 10:51:16 -07:00
Syrus
5b55490048 Fix Rust install 2019-09-01 10:45:32 -07:00