Commit Graph

7051 Commits

Author SHA1 Message Date
Syrus Akbary
6f54c1a6dc Merge pull request #130 from wasmerio/fix-compiler-llvm-unused-import
fix(compiler-llvm) Remove an unused import
2020-06-23 11:30:47 -07:00
Ivan Enderlin
fb956bf51e fix(compiler-cranelift) Remove an unused import. 2020-06-23 10:34:17 +02:00
Ivan Enderlin
209c91c707 fix(compiler) Ignore an unused argument. 2020-06-23 10:19:12 +02:00
Ivan Enderlin
f00e089ad3 fix(compiler-llvm) Remove an unused import. 2020-06-23 09:32:50 +02:00
Mark McCaskey
e67a3089fc Get WASI tests working 2020-06-22 17:11:02 -07:00
Syrus
56c2f52001 Improved Compiler API 2020-06-22 14:58:58 -07:00
Mark McCaskey
b96e74003c Merge branch 'master' into feature/readd-wasi-tests 2020-06-22 14:06:14 -07:00
Syrus Akbary
4ed23c59aa Merge pull request #117 from wasmerio/feature/shared-delayed-memory-initialization
Implement shared, delayed WASI memory initialization
2020-06-22 14:05:30 -07:00
Mark McCaskey
0448235560 Remove dead code from Makefile 2020-06-22 14:04:01 -07:00
Syrus Akbary
127c5d9dc0 Merge pull request #121 from wasmerio/feat-wasm-common-host-function-trap-early
feat(wasm-common) Support `Result` as returned type for host functions
2020-06-22 13:57:58 -07:00
Syrus Akbary
01563ad06c Update native.rs 2020-06-22 13:39:50 -07:00
Mark McCaskey
3996bdfb75 Add WASI test runner 2020-06-22 13:01:43 -07:00
Syrus Akbary
308544a41d Merge branch 'master' into feat-wasm-common-host-function-trap-early 2020-06-22 12:09:34 -07:00
Ivan Enderlin
f7493ff358 doc(api) Update. 2020-06-22 15:26:45 +02:00
Ivan Enderlin
1cd6eb8a21 test(api) Write more test cases for WasmTypeList. 2020-06-22 15:25:10 +02:00
Ivan Enderlin
3b03d7071b doc(api) Improve documentation. 2020-06-22 15:09:18 +02:00
Ivan Enderlin
d1e4f7c5ce feat(api) Improve the impl_traits macro + improve documentation.
The macro has been renamed `impl_host_function`, because it's
basically what it does. It implements other types and traits, but it's
all related to host functions.

The documentation has been improved. The generic parameters have been
renamed to be more self-explanatory. The code has been rewritten a little
bit to be easier to read. etc.
2020-06-22 15:05:55 +02:00
Ivan Enderlin
818706b318 doc(api) Improve documentation of HostFunctionKind and impls. 2020-06-22 14:05:19 +02:00
Ivan Enderlin
f8dfdae520 feat(api) Remove FunctionBody and use VMFunctionBody instead.
Avoid having multiple types for the same purpose.
2020-06-22 14:04:29 +02:00
Ivan Enderlin
a3f22afddc feat(api) Improve doc' + rename HostFunction.to_raw to ….function_body_ptr. 2020-06-22 13:40:22 +02:00
Ivan Enderlin
8479f53329 feat(api) Rename TrapEarly to IntoResult. And improve its doc. 2020-06-22 13:20:02 +02:00
Ivan Enderlin
e906621e49 doc(runtime) Fix a typo. 2020-06-22 13:05:16 +02:00
Ivan Enderlin
996135ae31 doc(api) Improve documentation of WasmTypeList. 2020-06-22 13:05:04 +02:00
Ivan Enderlin
ef3e43dcff feat(api) Rewrite the wasm_extern_type macro to avoid repetition. 2020-06-22 11:46:30 +02:00
Ivan Enderlin
58c83734f2 test(api) Remove the function_call test.
This test does nothing. It's not using the `Function` API.
2020-06-22 11:42:42 +02:00
Ivan Enderlin
32e02f32dc test(api) Clean up tests. 2020-06-22 11:42:12 +02:00
Ivan Enderlin
a623b9531e chore(api) Rename inner::Func to inner::Function and improve documentation. 2020-06-22 11:33:49 +02:00
Ivan Enderlin
07aff22c30 feat(api/wasm-common) Move WasmExternType from wasm-common to wasmer.
Because there is a trait implementation conflicts for the
implementations `WasmTypeList` for `$x*` where `$x: WasmExternType`.
2020-06-22 11:10:18 +02:00
Ivan Enderlin
63ec941dac Revert "!temp Remove impl of WasmTypeList for Infallible."
This reverts commit ad7c618193.
2020-06-22 11:05:48 +02:00
Ivan Enderlin
ad7c618193 !temp Remove impl of WasmTypeList for Infallible.
I don't think it is necessary anymore.
2020-06-22 10:48:15 +02:00
Syrus Akbary
9d2e4fd5e1 Merge pull request #128 from wasmerio/clippy
Some clippy cleanup.
2020-06-20 19:53:24 -07:00
Nick Lewycky
2017acf99e Some clippy cleanup. 2020-06-20 13:43:46 -07:00
Mark McCaskey
571bfb0bee Squashed 'tests/wasi/' content from commit 30a26ce
git-subtree-dir: tests/wasi
git-subtree-split: 30a26ce226227d410ccb0c86ec1cc6ed43916e0f
2020-06-19 15:45:42 -07:00
Mark McCaskey
93b55d44cd Merge commit '571bfb0bee8a2ef14c871912304938768ceb4e96' as 'tests/wasi' 2020-06-19 15:45:42 -07:00
Mark McCaskey
c702d291cd Add WASI wast parsing logic 2020-06-19 15:41:51 -07:00
Syrus Akbary
35737cf9bb Update README.md 2020-06-19 09:25:23 -07:00
Ivan Enderlin
5e26d9a74b !temp Move HostFunction, Func & co. into wasmer.
Because `Func` needs an access to the runtime API (`wasmer-runtime`)
to trap properly, either we move parts of `wasmer-runtime` to
`wasm-common`, or we move parts of `wasm-common` into `wasmer`. I
decided to go with the second approach since `wasmer` is the only
crate to use `HostFunction` & co. It's not “common” by definition, and
it's way easier (for the moment).
2020-06-19 15:20:28 +02:00
Ivan Enderlin
4afdd94d7a feat(wasm-common) Trap properly with raise_user_trap and resume_panic. 2020-06-19 10:57:56 +02:00
nlewycky
f98752bfe2 Merge pull request #124 from wasmerio/llvm-unwind
Add support for .eh_frame unwind info to compiler-llvm.
2020-06-18 18:15:52 -07:00
Nick Lewycky
c0b2f968e2 more formatting 2020-06-18 16:50:56 -07:00
Nick Lewycky
914da3266b cargo fmt 2020-06-18 16:48:44 -07:00
Nick Lewycky
84b32ed2cd cargo fmt 2020-06-18 16:46:45 -07:00
Nick Lewycky
b527127d0f load_object_file is returning an increasingly complex object.
Group the data from compilation of a function into its own struct and return that.
2020-06-18 16:43:43 -07:00
Nick Lewycky
30add15904 make lint cleanup 2020-06-18 15:50:35 -07:00
Nick Lewycky
27a0613e57 Remove unused use line. 2020-06-18 15:47:00 -07:00
Nick Lewycky
8edaf2d617 cargo fmt 2020-06-18 15:46:11 -07:00
Nick Lewycky
54c7b6f876 In trampoline generation, ensure all custom sections are eh frames.
.eh_frames may refer to the trampoline, but it is impossible to encode such a relocation. The optional relocation "self-referential" target is replaced with a better named mandatory argument. The value will be discarded in trampoline generation with the rest of the .eh_frame.
2020-06-18 15:37:08 -07:00
Nick Lewycky
310ac6b44c Shrink the 0-length CIE. The previous one came from /bin/ls on my machine, the new one is based on the CIE description in the DWARF 3 spec (the LSB description leaves out too much detail, like the size of the version field).
Formatting cleanup.
2020-06-18 15:37:06 -07:00
Nick Lewycky
21827d8f80 These three tests rely on sourcemap information too, which we aren't adding in this branch. 2020-06-18 15:35:39 -07:00
Nick Lewycky
8d11d3fc52 Remove gimli leftovers. 2020-06-18 15:35:39 -07:00