5159 Commits

Author SHA1 Message Date
Mark McCaskey
d7d5f5b894 Prepare for 0.16.0 release 2020-03-11 11:15:07 -07:00
Syrus Akbary
603065fe5f
Merge pull request #1286 from wasmerio/wapm-wax
Updated Windows Wasmer icons. Add wax
2020-03-10 21:39:29 -07:00
Syrus
a4a90dfcd8 Fixed WAPM version 2020-03-10 21:38:17 -07:00
Syrus
f2c5f88b21 Added wax symlink 2020-03-10 18:24:10 -07:00
Syrus Akbary
cce134de50
Merge branch 'master' into wapm-wax 2020-03-10 10:53:18 -07:00
Syrus Akbary
a1cdeede40
Update CHANGELOG.md 2020-03-10 10:52:53 -07:00
Syrus Akbary
ea641495f8
Merge pull request #1284 from Hywan/feat-interface-types-instructions-string-and-memory
feat(interface-types) Implement string and memory instructions
2020-03-10 09:48:25 -07:00
Ivan Enderlin
58c3b3489a doc(changelog) Add #1284. 2020-03-10 16:00:05 +01:00
Ivan Enderlin
c1e40f165e fix: Revert a file that wasn't a commit candidate. 2020-03-10 15:58:27 +01:00
Ivan Enderlin
52312ff0ad feat(interface-types) Remove the 'input lifetime on Instruction. 2020-03-10 10:37:09 +01:00
Ivan Enderlin
717914f82b Merge branch 'master' into feat-interface-types-instructions-string-and-memory 2020-03-10 10:33:56 +01:00
Ivan Enderlin
e9de8f9999 feat(interface-types) write-utf8 is renamed string-to-memory. 2020-03-10 10:27:17 +01:00
Ivan Enderlin
1b0bda82dd feat(interface-types) Rename write-utf8 to string-to-memory. 2020-03-10 10:25:58 +01:00
bors[bot]
674d18ed66
Merge #1281
1281: feat(interface-types) Rename `call` to `call-core`, and remove `call-export` r=syrusakbary a=Hywan

The latest standard removes `call-export` and has a single `call-core` instruction.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-09 18:03:28 +00:00
Syrus Akbary
50e5b78a6a
Merge pull request #1282 from Hywan/doc-interface-types-list-instructions
doc(interface-types) Improve the `README.md`
2020-03-09 10:41:16 -07:00
Ivan Enderlin
39d491e465 feat(interface-types) read-utf8 is renamed memory-to-string. 2020-03-09 15:06:35 +01:00
Ivan Enderlin
3cc4c6142c doc(interface-types) Improve the README.md. 2020-03-09 14:53:11 +01:00
Ivan Enderlin
637ff1e316 feat(interface-types) Rename call to call-core, and remove call-export. 2020-03-09 14:33:17 +01:00
bors[bot]
b292292267
Merge #1262
1262: Update to latest inkwell which adds context lifetime to basic blocks. r=nlewycky a=nlewycky

The latest inkwell adds lifetimes to basic blocks and also changes most APIs to pass them without reference.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-06 22:51:22 +00:00
Syrus
bd9aae1ed5 Updated Wasmer icons 2020-03-06 12:17:01 -08:00
Syrus
d1f79ae1e8 Fixed comments 2020-03-05 18:05:51 -08:00
Syrus
4b99a41e17 Added support for wapm wax 2020-03-05 17:22:16 -08:00
bors[bot]
4861e6ec5d
Merge #1272
1272: Fix WasmPtr to work with accesses accessing the final valid byte r=MarkMcCaskey a=MarkMcCaskey

Resolves #1258 

The fix was to change `>=` into `>`.  Doing this made us vulnerable to accessing memory to create an empty slice just out of bounds so we have to add some additional checks to make sure that that can't happen.

This PR also prevents accessing arrays of length 0 (the length bound is non-inclusive, so length 0 is never valid) and prevents access of zero-sized types.

The zero-sized type checks will probably be inlined (or will be in the future as `const fn` gets more mature) so provide no additional overhead.  The checking of if length == 0 does add some overhead, but on modern CPUs it shouldn't be an issue as it's a branch that should be always false in normal use.

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-05 23:46:37 +00:00
Mark McCaskey
8a8b3a43ac Add WasmPtr bug fix to changelog 2020-03-05 15:45:54 -08:00
Mark McCaskey
f8d34e0b57 Add WasmPtr access edge case test 2020-03-05 15:08:09 -08:00
Mark McCaskey
eb4c1bdace Prevent 0 length utf8 strings from WasmPtr too 2020-03-05 13:31:37 -08:00
Mark McCaskey
1c6424a754 Fix WasmPtr to work with accesses accessing the final valid byte
This also returns `None` for all accesses of zero sized types and
arrays of length 0.  Because the array accesses have a non-inclusive
length, length of 0 is not valid.  These checks prevent returning
empty slices that point just outside of memory bounds.
2020-03-05 13:23:50 -08:00
Syrus
548f8b19a2 Disable test-capi-singlepass 2020-03-04 14:19:19 -08:00
bors[bot]
5ab6e35672
Merge #1268
1268: Prepare for 0.15.0 release r=MarkMcCaskey a=MarkMcCaskey



# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-04 20:47:25 +00:00
Mark McCaskey
c295adbaa8 Prepare for 0.15.0 release 2020-03-04 12:26:19 -08:00
bors[bot]
3b09d0ffac
Merge #1267
1267: Improve support for preopened directories in WASI syscalls r=MarkMcCaskey a=MarkMcCaskey

Ported over from #1263 

# Description
<!-- 
Provide details regarding the change including motivation,
links to related issues, and the context of the PR.
-->

# Review

- [x] Add a short description of the the change to the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-04 19:54:05 +00:00
Mark McCaskey
69fd76af10 Improve support for preopened directories in WASI syscalls
Also filters our default logging more and improves some debug statements
2020-03-04 11:51:24 -08:00
bors[bot]
b2e6535aa0
Merge #1264
1264: feat(interface-types) Implement lifting and lowering instructions r=Hywan a=Hywan

For the moment, WIT defines [a bunch of lifting and lowering instructions](https://github.com/WebAssembly/interface-types/blob/master/proposals/interface-types/working-notes/instr.md). The encoders, the decoders and the AST support them, but we didn't have any instruction implementations for them. This PR implements the instructions for real.

To handle casting failure, I decided to use the `TryFrom` trait, instead of `as`, such as:

```rust
let x: i32 = 128;
let y: i8 = x.try_into().unwrap(); // fails
```

while:

```rust
let x: i32 = 128;
let y: i8 = x as _; // just overflows silently
```

Not all `*x` instructions aren't implement _yet_.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2020-03-04 13:43:33 +00:00
bors[bot]
973154cf33
Merge #1265
1265: Improve `WasmPtr` documentation r=MarkMcCaskey a=MarkMcCaskey

This came up multiple times when responding to people on our issue tracker.

Adds an example and a lot more information about `WasmPtr` and `ValueType`


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2020-03-04 01:05:31 +00:00
Mark McCaskey
4a6c96382d Update wording of doc comment from feedback 2020-03-03 17:04:52 -08:00
Mark McCaskey
469e43312a Improve WasmPtr documentation 2020-03-03 16:16:29 -08:00
bors[bot]
22d2031943
Merge #1217
1217: Polymorphic host functions based on dynamic trampoline generation. r=losfair a=losfair

This PR implements polymorphic host functions by dynamically generating the "glue" code that translates platform arguments to an array in `runtime-core`.

TODO:

- ~~Multiple return values.~~ Deferring to a future multivalue PR.
- [x] Dynamic signatures for polymorphic functions.
- [x] Use a proper executable memory allocator.

Co-authored-by: losfair <zhy20000919@hotmail.com>
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
Co-authored-by: Heyang Zhou <zhy20000919@hotmail.com>
2020-03-03 18:00:42 +00:00
losfair
f499dea0a7 Merge remote-tracking branch 'origin/master' into feature/polymorphic-v2 2020-03-04 01:56:52 +08:00
losfair
d9e744d9dc Resolve review comments. 2020-03-04 01:56:48 +08:00
Ivan Enderlin
de53659ee7 feat(interface-types) Implement s64-to-i32x and u64-to-i32x
Actually, `s64-to-i32` and `u64-to-i32` already error when overflow
happens.
2020-03-03 17:17:26 +01:00
Ivan Enderlin
c157bdaf63 test(interface-types) Test when lowering or lifting fails because of the value. 2020-03-03 17:10:10 +01:00
Ivan Enderlin
6576dfd64b test(interface-types) Add test cases for errors. 2020-03-03 17:04:26 +01:00
Ivan Enderlin
30e72eb796 feat(interface-types) Implement lifting and lowering instructions. 2020-03-03 16:57:05 +01:00
Nick Lewycky
3e0d299227 Update to latest inkwell which adds context lifetime to basic blocks. 2020-03-02 14:25:30 -08:00
bors[bot]
115a6573a9
Merge #1261
1261: Fix our side of wasmparser typo. r=MarkMcCaskey a=nlewycky

This is a `cargo update` plus change to fix for ac6df05378 .


Co-authored-by: Nick Lewycky <nick@wasmer.io>
2020-03-02 21:53:13 +00:00
bors[bot]
d2b546fef5
Merge #1260
1260: Recognize FreeBSD r=syrusakbary a=MikaelUrankar



Co-authored-by: MikaelUrankar <mikael.urankar@gmail.com>
2020-03-02 19:27:56 +00:00
Nick Lewycky
d5581331a2 Fix our side of wasmparser typo. 2020-03-02 11:16:21 -08:00
Syrus Akbary
e207c7f17d
Update LICENSE 2020-03-02 11:08:21 -08:00
MikaelUrankar
48fcc8af09 Recognize FreeBSD 2020-03-02 15:41:41 +01:00
Syrus Akbary
51084ec8fb
Update README.md 2020-02-29 09:47:00 -08:00