Commit Graph

1281 Commits

Author SHA1 Message Date
Brandon Fish
1957ddef53 Run emscripten tests with both compilers 2019-03-06 21:36:46 -06:00
Syrus
e63515279f Try to use LLVM_SYS_70_PREFIX for appveyor 2019-03-06 16:35:23 -08:00
Syrus
58897aba5a Try to use LLVM path uniformily for appveyor 2019-03-06 16:18:35 -08:00
Syrus
a0ff2733ce Go back to the appveyor build folder 2019-03-06 16:03:25 -08:00
Syrus
bd76a276fc Fixed path 2019-03-06 15:57:38 -08:00
Syrus
9812fa09c7 Trying custom LLVM install in windows appveyor 2019-03-06 15:49:35 -08:00
Syrus
0540c50b87 Use LLVM 5.0 instead of the default one 2019-03-06 15:27:41 -08:00
Syrus
95c90f84b7 Added LLVM to the PATH in windows appveyor 2019-03-06 15:13:38 -08:00
Lachlan Sneff
9f589de031 Reset Cargo.lock 2019-03-06 13:53:06 -08:00
Lachlan Sneff
e3e91c628b
Merge branch 'master' into feature/llvm-backend 2019-03-06 13:47:15 -08:00
Lachlan Sneff
334a1310df Change nginx integration just to test it it starts 2019-03-06 13:28:07 -08:00
Lachlan Sneff
9f93ac2fe5 Fix integration tests 2019-03-06 13:18:30 -08:00
Lachlan Sneff
8f2d90186d Fix circleci config 2019-03-06 12:45:42 -08:00
Lachlan Sneff
fd99ed60bf Split tests into spectests/code-tests and emscripten tests 2019-03-06 12:44:19 -08:00
Ivan Enderlin
ec1a16512c
Merge pull request #238 from Hywan/feat-runtime-c-api-headers-in-out-dir
feat(runtime-c-api) Generate the C/C++ header files in `OUT_DIR` (+ copy in `CARGO_MANIFEST_DIR`).
2019-03-06 18:50:29 +01:00
Ivan Enderlin
d709191be1 doc(runtime-c-api) Declare the example as C, so that they are not tested.
Those examples contain C code. They must not be run by `rustdoc` as
tests.
2019-03-06 12:08:02 +01:00
Ivan Enderlin
365d00979b chore(runtime-c-api) Update the Cargo.lock file. 2019-03-06 11:03:38 +01:00
Ivan Enderlin
76caebebb4 fix(runtime-c-api) Provide a link target.
When compiling `wasmer-runtime-c-api` as a dependency of another
crate, `rustc` emits this warning:

```
warning: The package `wasmer_runtime_c_api` provides no linkable
target. The compiler might raise an error while compiling
`foo`. Consider adding 'dylib' or 'rlib' to key `crate-type` in
`wasmer_runtime_c_api`'s Cargo.toml. This warning might turn into a
hard error in the future.
```

To solve this issue, the `rlib` type has been added to the
`crate-type` list.
2019-03-06 11:02:14 +01:00
Ivan Enderlin
0f74133be3 feat(runtime-c-api) Build: Copy the C header files from OUT_DIR to CARGO_MANIFEST_DIR.
This patch copies the generated C and C++ header files from the
`OUT_DIR` to the root of the crate.
2019-03-06 10:58:40 +01:00
Ivan Enderlin
f2997357fc feat(runtime-c-api) Remove the flag WASM_EMSCRIPTEN_GENERATE_C_API_HEADERS.
This patch removes the `WASM_EMSCRIPTEN_GENERATE_C_API_HEADERS`
flag. Consequently, the C header files will be generated for each
build.

The `generate-c-api-headers` feature is also removed, since it becomes useless.
2019-03-06 10:42:32 +01:00
Ivan Enderlin
7c56d893c2 feat(runtime-c-api) Generate the C header file in OUT_DIR.
This patch changes the directory where the C header files are
generated, from `CARGO_MANIFEST_DIR` to `OUT_DIR`. The goal is: When
`wasm-runtime-c-api` is used as a dependency of another Rust project,
then the C header files are accessible in the `target/` directory
(i.e. the `OUT_DIR`).

Also, since `rustc` has a `--out-dir` directory, it increases the
flexibility of this approach: The user can generate the C header files
where she wants.
2019-03-06 10:42:06 +01:00
Brandon Fish
03909fe3c2 Run spectests with both compilers, activate using features 2019-03-06 00:15:07 -06:00
Lachlan Sneff
0e5d1172d6 Just install the signal handler once 2019-03-05 16:50:49 -08:00
Syrus Akbary
28bb264266
Merge pull request #232 from Hywan/fix-runtime-c-api-remove-warnings
fix(runtime-c-api) Fix several warnings
2019-03-05 16:38:14 -08:00
Syrus Akbary
e7e0fa813a
Merge pull request #237 from Hywan/fix-runtime-c-api-cbindgen-version
fix(runtime-c-api) Update `cbindgen`
2019-03-05 16:37:45 -08:00
Lachlan Sneff
f36aade2e5 Fix broken test 2019-03-05 14:57:37 -08:00
Lachlan Sneff
48b36a3b01 Runs on linux and also hopefully ci 2019-03-05 14:54:44 -08:00
Lachlan Sneff
13850929d7 Try again with path instead of environment var 2019-03-05 13:45:19 -08:00
Lachlan Sneff
fa3ef2e88d Remove .llvmenv 2019-03-05 13:34:22 -08:00
Lachlan Sneff
ae8676df44 Attempt to update circleci config to install llvm 2019-03-05 13:32:02 -08:00
Lachlan Sneff
276e5125b5 Filter out -fno-exceptions from llvm-config --cxxflags 2019-03-05 13:23:26 -08:00
Lachlan Sneff
c86c910054 Add partiality to float truncation 2019-03-05 11:50:56 -08:00
Ivan Enderlin
8ed340b6f1 fix(runtime-c-api) Update cbindgen.
When requiring `wasmer-runtime-c-api`, I get the following conflicts:

```
error: failed to select a version for `serde_derive`.
    ... required by package `cbindgen v0.7.1`
    ... which is depended on by `wasmer-runtime-c-api v0.2.1`
    ... which is depended on by `foo v0.1.0 (/private/tmp/foo)`
versions that meet the requirements `= 1.0.58` are: 1.0.58

all possible versions conflict with previously selected packages.

  previously selected package `serde_derive v1.0.89`
    ... which is depended on by `wasmer-runtime-core v0.2.1`
    ... which is depended on by `wasmer-runtime-c-api v0.2.1`
    ... which is depended on by `foo v0.1.0 (/private/tmp/foo)`

failed to select a version for `serde_derive` which could resolve this conflict
```

This issue resolves by updating `cbindgen` to 0.8.
2019-03-05 14:28:35 +01:00
Ivan Enderlin
25feef7384 chore(runtime-c-api) Regenerate the header files. 2019-03-05 10:07:08 +01:00
Ivan Enderlin
86c41264a3 chore(runtime-c-api) Fix CS. 2019-03-05 10:07:08 +01:00
Ivan Enderlin
59de57e075 fix(runtime-c-api) Fix Clippy notes.
This patch fixes warnings raised by Clippy.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
053e5c40f4 fix(runtime-c-api) Avoid mutable bindings as much as possible.
This patch cleans several warnings where mutable bindings are declared
but used only as immutable bindings.

It's a little bit opinionated patch. I think it's interesting to use
`const` pointers as much as possible.
2019-03-05 10:07:08 +01:00
Ivan Enderlin
5ace3cfa2b fix(runtime-c-api) Remove unsafe blocks inside unsafe function.
This patch removes `unsafe { … }` blocks inside `unsafe` functions.

This patch also removes some warnings about camel case. All structures
with a C representation are automatically not mangle, and allow non
camel case.
2019-03-05 10:07:08 +01:00
Lachlan Sneff
f2b927bcd8 Remove debug print 2019-03-04 20:00:56 -08:00
Lachlan Sneff
fe8f8a0132 Add illegal arithmetic runtime error 2019-03-04 19:56:02 -08:00
Lachlan Sneff
3be7144892 Some cleanup 2019-03-04 17:37:05 -08:00
Lachlan Sneff
2969409ca7 Add hacky reinterpret instructions and pop used arguments off the value stack 2019-03-04 16:44:46 -08:00
Lachlan Sneff
25c0cef5f7 Up to 1242 passing spectests 2019-03-04 15:51:45 -08:00
Lachlan Sneff
7ef2c0dece Fix execute after free issue with llvm (and presumably cranelift?) 2019-03-04 14:41:56 -08:00
Lachlan Sneff
039ebdcf75 Fix merge errors and update llvm to use the new runtime error type. 2019-03-04 13:10:28 -08:00
Lachlan Sneff
4e198bca8b merge upstream/master into wasmer-private/feature/llvm-backend 2019-03-04 13:03:32 -08:00
Lachlan Sneff
65ec10961b
Change RuntimeError type (#234)
* Change RuntimeError type and fix codebase to use it

* Fix spectests to work with new runtime error type

* Fix windows signal handler in the clif-backend

* Add missing conversion

* final windows fix
2019-03-04 12:57:26 -08:00
Syrus Akbary
2d987982d6
Merge pull request #231 from Hywan/fix-clif-backend-module-new
fix(clif-backend) `Module::new` does not use its argument
2019-03-04 11:42:36 -08:00
Syrus Akbary
c1400d8c85
Merge pull request #227 from wasmerio/fix/c-api-fix-imports
Fix C API table/global/memory imports
2019-03-04 11:41:37 -08:00
Lachlan Sneff
deea9e98a4 Add import names, whoops. 2019-03-04 10:19:38 -08:00