Commit Graph

5038 Commits

Author SHA1 Message Date
43742cf980 doc(changelog) Add #1128. 2020-01-10 10:18:51 +01:00
9b2f0fc635 chore(runtime-core) Avoid code duplication. 2020-01-10 10:15:26 +01:00
57b6ad0600 Merge #1126
1126: Set default scale on fb window to fit screen r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-09 22:15:02 +00:00
fab3b787eb Merge #1130
1130: Add WindowClosed event to experimental fb r=MarkMcCaskey a=MarkMcCaskey

Allows things to behave properly and know when the window closes

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-09 20:25:36 +00:00
10da5bab6c Merge remote-tracking branch 'origin/master' into feature/unified-exceptions 2020-01-10 02:58:50 +08:00
9e2080def1 Run cargo fmt. 2020-01-10 02:54:50 +08:00
0a23327401 Emit exception table in singlepass. 2020-01-10 02:54:23 +08:00
8bf0c1966c Push code version for non-WASI entrypoints. 2020-01-10 02:53:31 +08:00
4b5b8976e9 Serialize/deserialize exception codes. 2020-01-10 02:53:08 +08:00
b08b65913b Add WindowClosed event to experimental fb 2020-01-09 12:11:34 -05:00
c81e49a091 feat(runtime-core) Replace missing host function by always_trap. 2020-01-09 15:12:09 +01:00
6018aa32e1 fix(runtime-core) Drop vm::FuncCtx if not null. 2020-01-09 15:11:51 +01:00
19c3837881 feat(runtime-core) Create the always_trap host function. 2020-01-09 15:10:53 +01:00
cd6e4bdaee test(runtime) Fix CS. 2020-01-09 15:10:23 +01:00
6370fd7b81 Merge #1123
1123: feat(runtime-c-api) Define the `DEPRECATED` C macro. r=Hywan a=Hywan

This PR defines a cross-compiler `DEPRECATED(message)` macro. It must
be used as follows in Rust:

```rust
/// This is a documentation.
/// cbindgen:prefix=DEPRECATED("This is a deprecation message.")
pub extern "C" fn wasmer_foo() -> c_uint {
    42
}
```

It will generate the following C header:

```c
/**
 * This is a documentation.
 */
DEPRECATED("This is a deprecation message.")
unsigned int wasmer_foo();
```

And once this code is used by a C compiler, it will print something
like this (example from Clang):

```
…/test.c:…:…: error: 'wasmer_foo' is deprecated: This is a deprecation message. [-Werror,-Wdeprecated-declarations]
    unsigned int x = wasmer_foo();
                     ^
…/wasmer.h:…:…: note: 'wasmer_foo' has been explicitly marked deprecated here
DEPRECATED("This is a deprecation message.")
^
…/wasmer.h:…:…: note: expanded from macro 'DEPRECATED'
```

This is required for further deprecations.

(cf https://github.com/eqrion/cbindgen/issues/408)

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Ivan Enderlin <ivan.enderlin@wanadoo.fr>
2020-01-09 13:11:52 +00:00
49401b7a9d Merge branch 'master' into feat-runtime-c-api-deprecated 2020-01-09 14:11:30 +01:00
f48a74e44a Set default scale on fb window to fit screen 2020-01-09 06:48:03 -05:00
7b6d8993e1 chore(runtime-c-api) Update C/C++ headers. 2020-01-09 10:17:34 +01:00
038fbc287d Merge branch 'feat-runtime-c-api-deprecated' of github.com:Hywan/wasmer into feat-runtime-c-api-deprecated 2020-01-09 10:16:41 +01:00
67b684ac85 feat(runtime-c-api) Improve DEPRECATED compatibility.
Clang can emulate GNUC or MSVC behaviors. So instead of detecting
whether Clang is used to compile the code, it's better to detect the
targeted features are available.

Code proposed by @nlewycky, thanks!
2020-01-09 10:13:22 +01:00
8e6015f231 Merge #1124
1124: Update wapm submodule to 0.4.2 r=MarkMcCaskey a=MarkMcCaskey

Uses the updated wapm from the new release https://github.com/wasmerio/wapm-cli/releases/tag/0.4.2 which fixes a bug

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-01-08 18:42:01 +00:00
34bf886883 Update wapm submodule to 0.4.2 2020-01-08 13:37:29 -05:00
f44517b9fb Look up exception tables in trap handler. 2020-01-09 01:42:50 +08:00
5c15ff9673 ExceptionCode and ExceptionTable. 2020-01-09 01:42:21 +08:00
c23eca25c0 Merge branch 'master' into feat-runtime-c-api-deprecated 2020-01-08 15:50:50 +01:00
4f691dde17 chore(runtime-c-api) Update headers. 2020-01-08 15:25:48 +01:00
b31a3dcdec feat(runtime-c-api) Define the DEPRECATED macro.
This PR defines a cross-compiler `DEPRECATED(message)` macro. It must
be used as follows in Rust:

```rust
/// This is a documentation.
/// cbindgen:prefix=DEPRECATED(This is a deprecation message.")
pub extern "C" fn wasmer_foo() -> c_uint {
    42
}
```

It will generate the following C header:

```c
/**
 * This is a documentation.
 */
DEPRECATED("This is a deprecation message.")
unsigned int wasmer_foo();
```

And once this code is used by a C compiler, it will print something
like this (example from Clang):

```
…/test.c:…:…: error: 'wasmer_foo' is deprecated: This is a deprecation message. [-Werror,-Wdeprecated-declarations]
    unsigned int x = wasmer_foo();
                     ^
…/wasmer.h:…:…: note: 'wasmer_foo' has been explicitly marked deprecated here
DEPRECATED("This is a deprecation message.")
^
…/wasmer.h:…:…: note: expanded from macro 'DEPRECATED'
```

This is required for further deprecations.
2020-01-08 15:02:57 +01:00
078242b55b Add test for ImportObject's allow_missing_functions 2020-01-07 12:04:50 -05:00
61cde95698 Merge pull request #1102 from wasmerio/dependabot/cargo/rayon-1.3.0
Bump rayon from 1.2.1 to 1.3.0
2020-01-07 16:38:39 +01:00
3e5545f4c2 Merge pull request #1105 from wasmerio/dependabot/cargo/smallvec-1.1.0
Bump smallvec from 0.6.13 to 1.1.0
2020-01-07 16:38:27 +01:00
b60c22937a Merge pull request #1112 from wasmerio/dependabot/cargo/structopt-0.3.7
Bump structopt from 0.3.5 to 0.3.7
2020-01-07 16:38:13 +01:00
0a8cfa5f97 Merge pull request #1114 from wasmerio/dependabot/cargo/blake2b_simd-0.5.10
Bump blake2b_simd from 0.5.9 to 0.5.10
2020-01-07 16:38:03 +01:00
f7ce59db0f Merge pull request #1115 from wasmerio/dependabot/cargo/generational-arena-0.2.7
Bump generational-arena from 0.2.6 to 0.2.7
2020-01-07 16:37:49 +01:00
d544f5a80f Run formatting 2020-01-07 16:14:58 +01:00
ee6949bcb4 Add checks back into makefile 2020-01-07 16:13:33 +01:00
59945a8875 Use detault 2020-01-07 16:13:33 +01:00
3b9cdc396d Recovered deleted tests 2020-01-07 16:13:33 +01:00
63f1d6b7ba Fixed path variable name 2020-01-07 16:13:33 +01:00
f967770ccf Fixed linting 2020-01-07 16:13:33 +01:00
720d4ec99c Fix checks on binary 2020-01-07 16:13:33 +01:00
8cff1adf5c Fix wasmer binary 2020-01-07 16:12:39 +01:00
d36d883528 Fix lint 2020-01-07 16:12:39 +01:00
e57677b63f Make cranelift optional for middleware 2020-01-07 16:12:39 +01:00
ac0c5c93ce Fixed lint 2020-01-07 16:12:39 +01:00
5d2ea93a89 Fixed changelog link 2020-01-07 16:12:39 +01:00
0cb3df256d Removed unnecessary checks 2020-01-07 16:12:39 +01:00
71be5bea16 Improved syntax 2020-01-07 16:12:39 +01:00
f3b9ecbaea Remove backend specific features from root Cargo 2020-01-07 16:12:39 +01:00
18421e3623 Make all tests pass 2020-01-07 16:12:39 +01:00
d7154fe791 Remove Backend dependency 2020-01-07 16:12:39 +01:00