Commit Graph

3690 Commits

Author SHA1 Message Date
Mark McCaskey
91cd88fde6 Fix bench targets in makefile 2019-09-23 16:33:29 -07:00
dependabot-preview[bot]
5fde93dcbd
Bump structopt from 0.3.1 to 0.3.2
Bumps [structopt](https://github.com/TeXitoi/structopt) from 0.3.1 to 0.3.2.
- [Release notes](https://github.com/TeXitoi/structopt/releases)
- [Changelog](https://github.com/TeXitoi/structopt/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TeXitoi/structopt/compare/v0.3.1...v0.3.2)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 22:32:22 +00:00
Syrus Akbary
1776b20b31
Merge pull request #795 from wasmerio/dependabot/cargo/serde-1.0.101
Bump serde from 1.0.100 to 1.0.101
2019-09-23 15:30:32 -07:00
dependabot-preview[bot]
2af0311487
Bump serde from 1.0.100 to 1.0.101
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 22:13:04 +00:00
Syrus Akbary
7376e651ff
Merge pull request #793 from wasmerio/dependabot/cargo/serde_derive-1.0.101
Bump serde_derive from 1.0.100 to 1.0.101
2019-09-23 15:11:06 -07:00
Nick Lewycky
07b5991080 No need to emit add of constant zero. 2019-09-23 15:01:19 -07:00
dependabot-preview[bot]
ebb7618341
Bump serde_derive from 1.0.100 to 1.0.101
Bumps [serde_derive](https://github.com/serde-rs/serde) from 1.0.100 to 1.0.101.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.100...v1.0.101)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-23 21:48:18 +00:00
bors[bot]
8c5ccdb497
Merge #807
807: Implement Send for Instance r=MarkMcCaskey a=MarkMcCaskey

# Review

- [x] Create a short description of the the change in the CHANGELOG.md file

Resolves #748 

WIP

## List of changes
### Commit 1
- `Global`s use Arc instead of RC
- Export `Context` and `FuncPointer` manually implement Send
- `ImportObject` uses `Arc<Mutex<HashMap<...>>>` Instead of `Rc<RefCell<HashMap<...>>>`; removed `get_namespace` method in favor of continuation style to deal with locking the Mutex
- `Func` manually implements `Send` (TODO: this change needs to be checked in depth)
### Commit 2
- `unsafe impl Send for Export {}` (temporary to allow Memory to be not Send)
- RefCell -> Mutex in Global and Table
- Rc -> Arc in Table
- Namespace's `IsExport`s must be `Send` (Done to avoid touching much more of the code (i.e. `trait IsExport: Send` requires a lot -- maybe this is what we should do though)
- Make `Host` and `Wasm` `Func`s Send (manual implementation)
- Manual implementation for `LocalTable` and `AnyFunc`
### Commit 3
- rm placeholder `unsafe impl Send for Export {}`
- Manual implementation for `LocalBacking` and `ImportBacking` (both seemed to be not Send due to direct ownership of mutable pointers in their containers)
- ImportObject's state creator Fn trait object is now ` + Send + Sync + 'static` (required because it's in an Arc)
- Manually implement Send for `InstanceInner` because it holds a raw pointer, `LocalBacking` and `ImportBacking` are marked Send separately 
- Memory: All Rc -> Arc (including unshared memory); All RefCell -> Mutex (including unshared memory)
- Manual implementation of Send and Sync on `UnsharedMemoryInternal`
- Manual implementation of Send and Sync on `SharedMemoryInternal`
- Change `runtime-core::unix::memory::Memory.fd` from `Option<Rc<Rawfd>>` to `Option<Arc<Rawfd>>` (not strictly required for this change because Memory has manual implementations of Send and Sync, but Arc seems more correct here and there's no comment justifying the use of Rc)
- Manual implementation of Send for `ImportedFunc`

Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-23 21:20:01 +00:00
Mark McCaskey
9cab6d721f Merge branch 'feature/make-instance-send' of github.com:wasmerio/wasmer into feature/make-instance-send 2019-09-23 13:43:48 -07:00
Mark McCaskey
c4818f12dc Update spectests to work with new Instance; use Arc<Mutex<>> 2019-09-23 13:43:01 -07:00
Syrus Akbary
eed033021b
Merge pull request #825 from Hywan/doc-runtime-core-memory-view
doc(runtime-core) Replace `map(|cell| cell.get())` by `map(Cell::get)`.
2019-09-23 11:34:00 -07:00
Mark McCaskey
705287c317
Merge branch 'master' into feature/make-instance-send 2019-09-23 11:06:00 -07:00
Mark McCaskey
1e637badc4 Merge remote-tracking branch 'origin/master' into feature/make-instance-send 2019-09-23 11:05:00 -07:00
Mark McCaskey
05ad1aaea4 Add test for Instance, fix tests for ImportObject 2019-09-23 11:04:31 -07:00
bors[bot]
23c7b201dd
Merge #817
817: Add feature matrix document r=MarkMcCaskey a=MarkMcCaskey

[rendered](https://github.com/wasmerio/wasmer/blob/docs/add-feature-matrix/docs/feature_matrix.md)

# Review

- [x] Create a short description of the the change in the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-23 17:21:30 +00:00
Mark McCaskey
2ef64b0a19 Update feature matrix with input from Brandon and Nick 2019-09-23 10:20:46 -07:00
Mark McCaskey
a5d4b9f730
Merge branch 'master' into docs/add-feature-matrix 2019-09-23 10:13:12 -07:00
Syrus Akbary
b41913ea1c
Merge pull request #823 from wasmerio/feature/emscripten-fixes-2
Various emscripten fixes
2019-09-23 10:08:09 -07:00
Ivan Enderlin
f289cb2ba9 doc(runtime-core) Replace map(|cell| cell.get()) by map(Cell::get).
Because it's simpler :-p.
2019-09-23 15:15:06 +02:00
Patrick Ventuzelo
5ace7a0af3 fix failing test 2019-09-23 11:17:02 +02:00
Syrus
62f76b1d5e Simplified error message 2019-09-22 18:35:26 -07:00
Syrus
e99119ace6 Added changes in CHANGELOG 2019-09-22 18:32:39 -07:00
Syrus
88b2bbc44f Improved error message 2019-09-22 18:29:13 -07:00
Syrus
9942d3ae98 Improved Emscripten / WASI autodetection 2019-09-22 18:23:22 -07:00
Syrus
bafd318284 Improved generate emtests and generate spectests 2019-09-22 17:46:16 -07:00
Azure Pipelines
8e2f526f73 Added cpp example 2019-09-22 17:42:19 -07:00
Azure Pipelines
009c123332 Fixed emscripten main functions 2019-09-22 17:29:12 -07:00
Brandon Fish
0671311bd7 Add cranelift update to changelog 2019-09-21 14:35:29 -05:00
Brandon Fish
a1a88c6eb8 Use the default features for wasmparser 2019-09-21 13:59:08 -05:00
Brandon Fish
f48d6f6690 Cranelift backend update to fork of clif version 0.43.1 2019-09-21 13:06:54 -05:00
Mark McCaskey
5e1e99cbfb
Merge branch 'master' into docs/add-feature-matrix 2019-09-20 17:03:17 -07:00
Mark McCaskey
c09e0e06df Update feature matrix 2019-09-20 17:01:41 -07:00
bors[bot]
7d9e6d8caa
Merge #821
821: Remove patch version in deps when not necessary r=MarkMcCaskey a=MarkMcCaskey

This allows wasmer library users to have more control over the exact versions of deps that Wasmer uses.

# Review

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-09-20 23:44:37 +00:00
Syrus Akbary
862a4c5448
Merge pull request #814 from confio/fix-linux-image-link-error
Fix issues with testing/linking singlepass in runtime-c-api
2019-09-20 16:33:30 -07:00
Mark McCaskey
bf396ec76d Remove patch version in deps when not necessary 2019-09-20 16:11:09 -07:00
bors[bot]
977f3a6406
Merge #820
820: Remove null pointer checks generally, re-add them in Emscripten r=MarkMcCaskey a=MarkMcCaskey

Resolves #818 

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


Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-09-20 20:22:32 +00:00
Mark McCaskey
7f2c532594 Allow dead code in emscripten WasmPtr 2019-09-20 13:19:31 -07:00
Mark McCaskey
882a77ccf9 Remove null pointer checks generally, re-add them in Emscripten 2019-09-20 12:02:12 -07:00
Patrick Ventuzelo
7deed3160b cargo fmt 2019-09-20 18:59:36 +02:00
Patrick Ventuzelo
ca409f78c5 fix spectest 2019-09-20 18:54:05 +02:00
bors[bot]
0790ebff0c
Merge #803
803: Add method to call function at index on Ctx r=MarkMcCaskey a=MarkMcCaskey

For #638 and #670

```Rust
fn call_guest_fn(ctx: &mut Ctx, guest_fn: u32) -> u32 {
    println!("{}", guest_fn);

    let guest_fn_typed = unsafe { std::mem::transmute(guest_fn) };

    let result = ctx.call_with_table_index(guest_fn_typed, &[]).unwrap();
    println!("  -> {:?}", result);

    0
}
```
is what this looks like from the Host side

See `examples/callback.rs` for an example that doesn't require `transmute`


# Review

- [x] Create a short description of the the change in the CHANGELOG.md file


Co-authored-by: Mark McCaskey <mark@wasmer.io>
Co-authored-by: Mark McCaskey <markmccaskey@users.noreply.github.com>
2019-09-19 20:55:09 +00:00
Mark McCaskey
3b200fa4d3 Move callback guest out of direct examples dir 2019-09-19 13:53:07 -07:00
bors[bot]
aa67dbee90
Merge #813
813: Fix test printf typo r=Hywan a=ethanfrey

<!-- 
Prior to submitting a PR, review the CONTRIBUTING.md document for recommendations on how to test:
https://github.com/wasmerio/wasmer/blob/master/CONTRIBUTING.md#pull-requests

-->

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

Fixes #812 

`%lld -> %ld fixes cargo test compile error`

# Review

- [ ] Create a short description of the the change in the CHANGELOG.md file


Co-authored-by: Ethan Frey <ethanfrey@users.noreply.github.com>
Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-09-19 20:15:55 +00:00
Ivan Enderlin
9a49fb59e0
Merge branch 'master' into fix-test-typo 2019-09-19 22:15:32 +02:00
bors[bot]
dd1a4a6c10
Merge #805
805: Replace panic! & unimplemented! in runtime-code and llvm-backend r=nlewycky a=pventuzelo

# Description

Replace `unimplemented!` by already used `CodegenError` in `lib/llvm-backend/src/code.rs`
Replace `unimplemented!` by `Err` in `lib/llvm-backend/src/trampolines.rs`
Replace `panic!` by already used `BinaryReaderError` in `lib/runtime-core/src/parse.rs`

# Review

- [ ] Create a short description of the the change in the CHANGELOG.md file


Co-authored-by: Patrick Ventuzelo <ventuzelo.patrick@gmail.com>
2019-09-19 19:20:04 +00:00
Mark McCaskey
451b458fc3 Add feature matrix document 2019-09-19 10:39:47 -07:00
bors[bot]
299fac9c62
Merge #792
792: Remove colored CLI output from wasmer-runtime-core lib r=syrusakbary a=repi

When the colored output was originally added in https://github.com/wasmerio/wasmer/pull/489 and there was a discussion then about that it should ideally be in a higher-level crate rather than in the runtime-core library crate.

I agree with that, users of the library shouldn't be required to bring in the `colored` crate dependency and ideally also not have stdout/stderr output either, that should be controlled by the application that uses wasmer-runtime-core, not the library.

Disabling stdout/stderr output would be more intrusive but I wanted to at least not have colored output and another crate dependency so this change removes the colored output and the `colored` crate.

`colored` also had quite a few dependencies and, while well used, is not super actively maintained. So this change also removes 6 transitive dependencies of the `colored` crate which is great.

This could potentially be a feature flag instead also, but would be a bit messier.

Co-authored-by: Johan Andersson <repi@repi.se>
2019-09-19 14:47:07 +00:00
Johan Andersson
8d0edc61df Merge master 2019-09-19 11:16:14 +02:00
Mark McCaskey
f709122444 Merge branch 'feature/call-function-at-index-on-just-ctx' of github.com:wasmerio/wasmer into feature/call-function-at-index-on-just-ctx 2019-09-18 17:13:26 -07:00
Mark McCaskey
a090bec490 Add examples step in Makefile and add it to integration-tests 2019-09-18 17:12:48 -07:00