Commit Graph

3256 Commits

Author SHA1 Message Date
Mark McCaskey
8c56ee682e Further implement framebuffer 2019-09-04 13:07:50 -07:00
Mark McCaskey
85358a84ae framebuffer wip 2019-08-30 15:35:07 -07:00
bors[bot]
569d0386a9
Merge #732
732: Remove fd_entry lookup on stdin,out,err for wasi::poll_oneoff r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-29 17:55:36 +00:00
Mark McCaskey
7027d7b2c8 Improve code reuse in polling, reduce cfg usage too 2019-08-29 10:54:27 -07:00
Mark McCaskey
fba6dbff78 Add tests for stdin, stdout, stderr; implement bytes_available too 2019-08-29 10:42:38 -07:00
Mark McCaskey
0776da7e22 Remove fd_entry lookup on stdin,out,err for wasi::poll_oneoff 2019-08-28 16:14:14 -07:00
bors[bot]
5205adabf5
Merge #731
731: Always flush when writing, even if we get invalid pointers r=MarkMcCaskey a=MarkMcCaskey

Not exactly an "invalid pointer" but, we were seeing an iovec of length 0 passed in which was causing `__WASI_EFAULT` which was preventing things from flushing properly.

While I was fixing this, I decided to clean it up and make the behavior more obvious by creating a wrapper function.

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-28 22:19:16 +00:00
Mark McCaskey
6767087004 Always flush when writing, even if we get invalid pointers 2019-08-28 15:13:30 -07:00
Syrus Akbary
7d05d3c0b8
Added wasmr (wasmer in R) to the language integrations 2019-08-28 13:05:48 -07:00
bors[bot]
6892a586b7
Merge #729
729: Add comment explaining why WasmHash is implemented the way it is r=MarkMcCaskey a=MarkMcCaskey



Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-27 21:29:52 +00:00
Mark McCaskey
538bba5638 Add comment explaining why WasmHash is implemented the way it is 2019-08-27 11:50:03 -07:00
Syrus Akbary
854b2013ea
Merge pull request #716 from wasmerio/fix/install-script-portability
Update install script to use the more potable `=` instead of `==`
2019-08-22 17:26:14 -07:00
Mark McCaskey
c0e6f3bae2 Update install script to use the more potable = instead of == 2019-08-22 17:10:17 -07:00
Syrus Akbary
84588e124a
Merge pull request #714 from wasmerio/feature/add-code-of-conduct-1
Create CODE_OF_CONDUCT.md
2019-08-22 15:05:12 -07:00
Brandon Fish
2719ec313c
Create CODE_OF_CONDUCT.md 2019-08-22 16:16:34 -05:00
bors[bot]
e2bbd4564e
Merge #712
712: Improve build instructions in README, test on Rust 1.36 r=MarkMcCaskey a=MarkMcCaskey

Copied from syn (which is copied from num) (https://github.com/dtolnay/syn/issues/372)

[rendered](8fa4ef34c1/README.md (building))

Co-authored-by: Mark McCaskey <mark@wasmer.io>
2019-08-22 18:57:20 +00:00
Mark McCaskey
8fa4ef34c1 Improve build instructions in README, test on Rust 1.36 2019-08-22 11:26:23 -07:00
bors[bot]
877fe4460e
Merge #708
708: runtime-c-api: not installing cranelift if not necessary r=Hywan a=YaronWittenstein

having `default-features = false` lets us install the `runtime-c-api` with `default-backend-singlepass` without installing also `cranelift`

Co-authored-by: Yaron Wittenstein <yaron.wittenstein@gmail.com>
2019-08-22 14:39:17 +00:00
Yaron Wittenstein
86a3a75fe7 adding to llvm-backend feature: "wasmer-runtime/default-backend-llvm" 2019-08-22 17:21:13 +03:00
Yaron Wittenstein
ad49e98183 Merge branch 'master' into c-api-cargo-singlepass-feature 2019-08-22 17:09:29 +03:00
Yaron Wittenstein
dd705d8031 Cargo.toml - building singlepass-backend without default features works 2019-08-22 16:36:01 +03:00
Yaron Wittenstein
4fcf61f3a0 Cargo.toml - fix 2019-08-22 15:52:23 +03:00
Yaron Wittenstein
0d888824cd Cargo.toml - renaming features 2019-08-22 14:36:12 +03:00
bors[bot]
7e030272b4
Merge #566
566: doc(runtime-c-api) Document and reorganize `exports.rs`. r=Hywan a=Hywan

This patch moves all structs at the beginning of the file, and
documents them.

Co-authored-by: Ivan Enderlin <ivan.enderlin@hoa-project.net>
2019-08-22 11:30:32 +00:00
Ivan Enderlin
6403159b57
Merge branch 'master' into doc-runtime-c-api-exports-1 2019-08-22 13:29:54 +02:00
Ivan Enderlin
a9bb8fea16
doc(runtime-c-api) Fix a typo.
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
2019-08-22 13:29:26 +02:00
Ivan Enderlin
8ad181f94c
doc(runtime-c-api) Fix a typo.
Co-Authored-By: Syrus Akbary <me@syrusakbary.com>
2019-08-22 13:29:11 +02:00
Yaron Wittenstein
2c3e5f06d0 Cargo.toml - renaming feature default-backend-singlepass to singlepass. 2019-08-22 14:23:13 +03:00
Yaron Wittenstein
0b84d9b5af Cargo.toml - installing cranelif by default. 2019-08-22 13:24:25 +03:00
Yaron Wittenstein
4a74023793 Merge branch 'master' into c-api-cargo-singlepass-feature 2019-08-22 13:06:45 +03:00
bors[bot]
763edf99df
Merge #663
663: Bump nix from 0.14.1 to 0.15.0 r=Hywan a=dependabot-preview[bot]

Bumps [nix](https://github.com/nix-rust/nix) from 0.14.1 to 0.15.0.
<details>
<summary>Changelog</summary>

*Sourced from [nix's changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md).*

> ## [0.15.0] - 10 August 2019
> ### Added
> - Added `MSG_WAITALL` to `MsgFlags` in `sys::socket`.
>   ([#1079](https://github-redirect.dependabot.com/nix-rust/nix/pull/1079))
> - Implemented `Clone`, `Copy`, `Debug`, `Eq`, `Hash`, and `PartialEq` for most
>   types that support them. ([#1035](https://github-redirect.dependabot.com/nix-rust/nix/pull/1035))
> - Added `copy_file_range` wrapper
>   ([#1069](https://github-redirect.dependabot.com/nix-rust/nix/pull/1069))
> - Add `mkdirat`.
>   ([#1084](https://github-redirect.dependabot.com/nix-rust/nix/pull/1084))
> - Add `posix_fadvise`.
>   ([#1089](https://github-redirect.dependabot.com/nix-rust/nix/pull/1089))
> - Added `AF_VSOCK` to `AddressFamily`.
>   ([#1091](https://github-redirect.dependabot.com/nix-rust/nix/pull/1091))
> - Add `unlinkat`
>   ([#1058](https://github-redirect.dependabot.com/nix-rust/nix/pull/1058))
> - Add `renameat`.
>   ([#1097](https://github-redirect.dependabot.com/nix-rust/nix/pull/1097))
> 
> ### Changed
> - Support for `ifaddrs` now present when building for Android.
>   ([#1077](https://github-redirect.dependabot.com/nix-rust/nix/pull/1077))
> - Minimum supported Rust version is now 1.31.0
>   ([#1035](https://github-redirect.dependabot.com/nix-rust/nix/pull/1035))
>   ([#1095](https://github-redirect.dependabot.com/nix-rust/nix/pull/1095))
> - Now functions `statfs()` and `fstatfs()` return result with `Statfs` wrapper
>   ([#928](https://github-redirect.dependabot.com/nix-rust/nix/pull/928))
> 
> ### Fixed
> - Enabled `sched_yield` for all nix hosts.
>   ([#1090](https://github-redirect.dependabot.com/nix-rust/nix/pull/1090))
> 
> ### Removed
</details>
<details>
<summary>Commits</summary>

- See full diff in [compare view](https://github.com/nix-rust/nix/commits)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=nix&package-manager=cargo&previous-version=0.14.1&new-version=0.15.0)](https://dependabot.com/compatibility-score.html?dependency-name=nix&package-manager=cargo&previous-version=0.14.1&new-version=0.15.0)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-08-22 08:45:26 +00:00
Yaron Wittenstein
2370553f3b Merge branch 'master' into c-api-cargo-singlepass-feature 2019-08-22 11:12:04 +03:00
Yaron Wittenstein
ad0cf47812 Merge branch 'develop' into c-api-cargo-singlepass-feature 2019-08-22 11:05:08 +03:00
Yaron Wittenstein
e6387ec7c3 Merge branch 'master' into c-api-cargo-singlepass-feature 2019-08-22 11:02:57 +03:00
dependabot-preview[bot]
5d4b78e880
Bump nix from 0.14.1 to 0.15.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.14.1 to 0.15.0.
- [Release notes](https://github.com/nix-rust/nix/releases)
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/commits)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-21 22:36:56 +00:00
bors[bot]
a7c70043c1
Merge #702
702: Add support for shared memory in Wasm. r=nlewycky a=nlewycky

Add support for memory regions with the shared flag. These are part of the threads proposal.

- Add new `--enable-threads` flags and pass it through to wasmparser.rs and wabt (for .wat files).
- Enable `--enable-threads` when parsing spectests. Enables the shared memory region in `simd.wast`.
- Adds `atomic.wast`, the spec test for the threads proposal. With the LLVM backend, all tests pass.
- Removes the `runtime-core/src/memory/static_` directory since there's no need for it to include two implementations. We use the same implementation of static memory for shared and unshared static memory.
- Implements the atomic instructions in the LLVM backend. However, `atomic.load` and `atomic.store` are provided **with no atomicity.** The rmw and cmpxchg instructions are sequentially consistent.
- `atomic.notify` and `atomic.wait` are unimplemented.

Co-authored-by: Nick Lewycky <nick@wasmer.io>
2019-08-21 22:05:15 +00:00
Nick Lewycky
8705fe172d Merge branch 'master' of github.com:wasmerio/wasmer into feature/shared-memory 2019-08-21 15:04:38 -07:00
Nick Lewycky
e6ec261cd5 Remove commented out code. 2019-08-21 15:01:21 -07:00
bors[bot]
31365510ed
Merge #703
703: Fix compilation on AArch64 Linux. r=losfair a=losfair

This only fixes compilation. Cranelift still reports many `not yet implemented` on AArch64.

Co-authored-by: losfair <zhy20000919@hotmail.com>
2019-08-21 17:51:48 +00:00
bors[bot]
15913a946f
Merge #666 #695
666: Bump serde_bytes from 0.11.1 to 0.11.2 r=Hywan a=dependabot-preview[bot]

Bumps [serde_bytes](https://github.com/serde-rs/bytes) from 0.11.1 to 0.11.2.
<details>
<summary>Release notes</summary>

*Sourced from [serde_bytes's releases](https://github.com/serde-rs/bytes/releases).*

> ## 0.11.2
> - Support "alloc" feature on stable Rust 1.36+ ([#16](https://github-redirect.dependabot.com/serde-rs/bytes/issues/16), thanks [@&#8203;martindisch](https://github.com/martindisch))
</details>
<details>
<summary>Commits</summary>

- [`4856e26`](4856e2611f) Release 0.11.2
- [`1d40bb5`](1d40bb5994) Merge pull request [#16](https://github-redirect.dependabot.com/serde-rs/bytes/issues/16) from martindisch/alloc-stable
- [`a626ecc`](a626ecce86) Remove unstable feature attribute for alloc crate
- See full diff in [compare view](https://github.com/serde-rs/bytes/compare/0.11.1...0.11.2)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde_bytes&package-manager=cargo&previous-version=0.11.1&new-version=0.11.2)](https://dependabot.com/compatibility-score.html?dependency-name=serde_bytes&package-manager=cargo&previous-version=0.11.1&new-version=0.11.2)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

695: Bump serde from 1.0.98 to 1.0.99 r=Hywan a=dependabot-preview[bot]

Bumps [serde](https://github.com/serde-rs/serde) from 1.0.98 to 1.0.99.
<details>
<summary>Release notes</summary>

*Sourced from [serde's releases](https://github.com/serde-rs/serde/releases).*

> ## v1.0.99
> - Update Syn dependency to 1.0.
> 
>     *Note: This raises the minimum required compiler version for serde_derive from rustc 1.15 to rustc 1.31. The minimum required compiler version for serde remains at rustc 1.13.*
</details>
<details>
<summary>Commits</summary>

- [`192f5cd`](192f5cd647) Release 1.0.99
- [`7dceee6`](7dceee64fe) Merge pull request [#1591](https://github-redirect.dependabot.com/serde-rs/serde/issues/1591) from dtolnay/up
- [`8ad6ae7`](8ad6ae71c6) Update serde_derive minimum rustc version to 1.31
- [`3ea85a2`](3ea85a28cf) Update to syn/quote 1.0
- [`273ecdb`](273ecdb786) Update ui tests on nightly-2019-08-16
- [`de40eb7`](de40eb7306) Update serde_derive to use question mark
- [`b9c4407`](b9c44073ce) Update serde_test to use question mark
- [`d6e5947`](d6e5947ad2) Suppress warnings about try! macro
- [`668651e`](668651ee01) Format with rustfmt 2019-07-30
- [`fb1cacc`](fb1cacc10e) Update Attr structs to hold symbols
- Additional commits viewable in [compare view](https://github.com/serde-rs/serde/compare/v1.0.98...v1.0.99)
</details>
<br />

[![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.98&new-version=1.0.99)](https://dependabot.com/compatibility-score.html?dependency-name=serde&package-manager=cargo&previous-version=1.0.98&new-version=1.0.99)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

**Note:** This repo was added to Dependabot recently, so you'll receive a maximum of 5 PRs for your first few update runs. Once an update run creates fewer than 5 PRs we'll remove that limit.

You can always request more updates by clicking `Bump now` in your [Dependabot dashboard](https://app.dependabot.com).

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2019-08-21 07:46:26 +00:00
losfair
3f0dae3329 Fix compilation on AArch64 Linux. 2019-08-20 16:37:32 -07:00
Nick Lewycky
08ee2c0297 Run cargo update. 2019-08-20 12:59:35 -07:00
Nick Lewycky
2882c75957 No need to emit any alignment check for byte-aligned accesses. 2019-08-20 11:30:30 -07:00
Nick Lewycky
70d561a1dd Remove SharedStaticMemory and simplify surrounding code. 2019-08-20 11:30:19 -07:00
Nick Lewycky
1568084d42 Add atomic.wast which we have zero failures on with the llvm backend.
Enable shared memory usage in simd.wast.

Exclude atomic.wast on singlepass and clif.
2019-08-20 11:17:52 -07:00
Nick Lewycky
dcf70167da Fix i64.atomic.load32_u and all alignment checks. 2019-08-20 11:03:22 -07:00
Nick Lewycky
0ba73ac50c Correct flipped misalignment test. 2019-08-20 10:39:53 -07:00
Nick Lewycky
172ef77ddd Use the static intrinsics for static shared memory too. 2019-08-19 17:26:35 -07:00
Nick Lewycky
d66b805529 Add misaligned atomic access trap display for WasmTrapInfo. 2019-08-19 17:26:15 -07:00
Nick Lewycky
0eba153232 Implement shared static memory similarly to unshared static memory. 2019-08-19 15:18:22 -07:00