Commit Graph

27 Commits

Author SHA1 Message Date
Ivan Enderlin
3f924dbb45 feat(api,emscritpen,wasi) Update WasmExternType to FromToNativeWasmType. 2020-06-30 12:10:27 +02:00
Ivan Enderlin
2d025c24ea feat(api) Remove the WasmExternTypeInner trait.
I believe this trait is no longer necessary since `WasmExternType` has
been moved inside the `wasmer` crate itself (this crate).

See https://github.com/wasmerio/wasmer-reborn/pull/121.

`cargo check` and `cargo test` agrees.

Also, this trait is annoying to implement abstraction over
`NativeFunc` since it is not re-exported outside of the crate.
2020-06-25 16:55:36 +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
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
Syrus
93024cccc8 Last round of feedback 2020-06-15 15:16:23 -07:00
Syrus
0ae7982931 Re-enabled non-optimized function trampolines approach 2020-06-15 14:53:34 -07:00
Syrus
050493e354 Fixed lint issue 2020-06-15 13:58:57 -07:00
Syrus
58cc08e37a Inline further to optimize native calls 2020-06-15 13:48:07 -07:00
Syrus
24077fb919 Added tests for host functions calls 2020-06-15 13:33:46 -07:00
Syrus
99ed3e889e Simplified has_env structure 2020-06-15 13:22:20 -07:00
Syrus
fca0d0c9fe Fixed feedback 2020-06-15 12:59:07 -07:00
Syrus
e5838d8ccb Added full support for dynamic functions with env 2020-06-13 15:52:42 -07:00
Syrus
b7dc092256 Fixed native compilation 2020-06-13 01:21:10 -07:00
Syrus
cd1138d520 Added support for native calls to dynamic functions 2020-06-12 20:50:24 -07:00
Syrus
21389f34ce Improved docs 2020-06-12 19:01:58 -07:00
Mark McCaskey
70e25a7396 Emscripten compiles with no errors! 2020-06-10 17:03:44 -07:00
Mark McCaskey
f9d8249a2f Update Emscripten to use new env and new types 2020-06-10 11:52:17 -07:00
Mark McCaskey
d492084f63 Fix tests 2020-06-09 14:35:42 -07:00
Mark McCaskey
7eb54950f1 Revert changes to Exportable 2020-06-09 13:26:12 -07:00
Mark McCaskey
a8faa2eb9c Add benchmark with many parameters 2020-06-09 13:14:12 -07:00
Mark McCaskey
5f5c7d6725 Clean up and comment out some NativeFunc tests for now 2020-06-09 12:36:07 -07:00
Mark McCaskey
eb928e739c Implement host functions in 1 case, optimize NativeFunc::call
`NativeFunc::call` is about 8% faster in the case we're benchmarking
by avoiding allocating a vector for the params / returns, instead we
do logic to determine which is larger and use that, conditionally
copying it back to the rets array if needed.
2020-06-09 11:35:58 -07:00
Mark McCaskey
8530e5eb55 Implement Exportable for NativeFunc 2020-06-08 16:07:22 -07:00
Mark McCaskey
e2b6041a65 Add benchmark 2020-06-08 13:58:21 -07:00
Mark McCaskey
b46ea5b9cb Get NativeFunc passing basic tests 2020-06-08 12:53:00 -07:00
Mark McCaskey
d1429fb18b Fix up macro issue 2020-06-04 16:41:57 -07:00
Syrus
09abc79bf6 Macros don’t work in API but work in common crate 2020-05-03 17:13:07 -07:00