Commit Graph

7051 Commits

Author SHA1 Message Date
Mark McCaskey
4cf4366e67 Merge pull request #142 from wasmerio/feature/memory-and-table-send-and-sync
Add code to make `Memory` and `Table` `Send` and `Sync`
2020-07-06 11:29:51 -07:00
Mark McCaskey
438531b5c0 Make VMTableDefinition Copy 2020-07-06 11:15:42 -07:00
Mark McCaskey
f68df123a4 Mark Export Memory and Table Send and Sync 2020-07-06 10:58:42 -07:00
Mark McCaskey
fc7d676470 Fix memory leak in LinearMemory 2020-07-06 10:57:11 -07:00
Mark McCaskey
4711abdebb Fix deadlock in Table implementation 2020-07-06 10:56:52 -07:00
Mark McCaskey
de0c548653 Improve thread safety of core types 2020-07-06 10:52:19 -07:00
Syrus Akbary
f7eef7ff0f Merge pull request #141 from wasmerio/feat-wasm-common-code-improvement-map-into
feat(wasm-common) Remove a useless closure
2020-07-06 03:23:40 -07:00
Ivan Enderlin
9497f49f0c feat(wasm-common) Remove a useless closure. 2020-07-06 11:35:51 +02:00
Syrus Akbary
9e1533c587 Merge pull request #140 from wasmerio/feat-wasm-common-remove-useless-code
feat(wasm-common) Remove useless code
2020-07-05 20:52:34 -07:00
Ivan Enderlin
84d3379c1a feat(wasm-common) Remove useless code.
This code is commented and no longer used. The `FunctionType`
implements `PartialEq` and `Eq`; same for all its fields since they
are of kind `Vec<Type>`. This method is no longer needed.
2020-07-03 15:20:35 +02:00
Syrus Akbary
163462f9ed Update wasmer.iss 2020-07-02 17:13:49 -07:00
Syrus Akbary
e400aa87bf Merge pull request #119 from wasmerio/feat-rename-wasmexterntype
feat(wasm-common) Reimplement `WasmExternType` as `FromToNativeWasmType`
2020-07-02 12:58:02 -07:00
Syrus Akbary
d40c947aeb Merge pull request #137 from wasmerio/feat-api-export-exportsiterator
feat(api) Export `ExportsIterator`
2020-07-02 12:18:00 -07:00
Syrus Akbary
bc161c89ce Merge pull request #138 from wasmerio/doc-wasi-generate-import-object-from-env
doc(wasi) Fix documentation of `generate_import_object_from_env`
2020-07-02 10:56:07 -07:00
Ivan Enderlin
ea78fe5fa4 test(api) Fix test about FromToNativeWasmType. 2020-07-02 17:19:54 +02:00
Ivan Enderlin
711c8f50ed doc(wasi) Fix documentation of generate_import_object_from_env. 2020-07-02 15:02:40 +02:00
Ivan Enderlin
561b7ef07d feat(api) Export ExportsIterator. 2020-07-02 13:44:35 +02:00
Ivan Enderlin
8c937d3db4 Merge branch 'master' into feat-rename-wasmexterntype 2020-07-02 11:23:08 +02:00
Ivan Enderlin
ea0a0ec127 feat(api) Avoid string allocations in FromToNativeWasmType.
When `from_native` or `to_native` fail, panic with a `&'static str`
instead of a `String`. Since this string is always created, it's
better to avoid this allocation for every call.
2020-07-02 11:18:47 +02:00
Syrus
e1897db119 Remove leaked files 2020-07-01 15:13:44 -07:00
Syrus Akbary
6bb042e0b0 Merge pull request #132 from wasmerio/feat-api-re-export
feat(api) Re-export `WithEnv` and `WithoutEnv`
2020-06-30 12:42:16 -07:00
Ivan Enderlin
3f924dbb45 feat(api,emscritpen,wasi) Update WasmExternType to FromToNativeWasmType. 2020-06-30 12:10:27 +02:00
Ivan Enderlin
12c04fbd94 test(api) Add tests for the FromToNativeWasmType trait. 2020-06-30 12:09:55 +02:00
Ivan Enderlin
26603a7e0c feat(api) Reimplement WasmExternType as FromToNativeWasmType.
In addition to a more self-explanatory renaming from `WasmExternType`
to `FromToNativeWasmType`, this patch updates the `to_native` and the
`from_native` methods to panic when the values cannot be converted
from one type to another by using their respective `TryInto`
implementations.

For instance, `7i8.to_native()` equals to `7i32`, but
`u32::MAX.to_native()` cannot be converted to `i32`, and so it will
panic with the message:

> cannot convert 4294967295u32 to i32.

The old implementation was returning `-1i32`, which was incorrect.
2020-06-30 12:08:45 +02:00
Ivan Enderlin
6bf62d1a73 test(wasm-common) Add a roundtrip test case for NativeWasmType. 2020-06-30 11:57:53 +02:00
Ivan Enderlin
507ff90112 feat(wasm-common) Inline to_binary and from_binary. 2020-06-30 11:57:24 +02:00
Ivan Enderlin
d3d6f9b029 doc(wasm-common) Improve documentation of NativeWasmType. 2020-06-30 11:57:07 +02:00
Ivan Enderlin
c053e154f4 feat(api) Create the public internals module. 2020-06-30 10:09:06 +02:00
Syrus Akbary
b6af8375f9 Merge pull request #134 from wasmerio/feat-api-wasmtypelist-from-slice
feat(api) Add the `WasmTypeList::from_slice` method
2020-06-26 09:39:49 -07:00
Ivan Enderlin
3c2e191d6a feat(api) Add the WasmTypeList::from_slice method.
This method creates a `WasmTypeList` from a slice of `i128`, similarly
to what `from_array` does, but without knowing the size ahead of time.
2020-06-26 14:54:32 +02:00
Syrus Akbary
fffddb78a9 Merge pull request #133 from wasmerio/feat-api-nativefunc-remove-wasmexterntypeinner
feat(api) Remove the `WasmExternTypeInner` trait
2020-06-25 13:10:41 -07: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
9b721fab1b feat(api) Re-export WithEnv and WithoutEnv.
It is required for `deprecated/runtime-core/`.
2020-06-25 11:15:43 +02:00
Syrus
b78b490e85 Use wasmer object to generate the object file 2020-06-24 20:52:46 -07:00
Syrus
b4e15ffb7b Fixed continously building build.rs 2020-06-24 17:53:22 -07:00
Mark McCaskey
c4739852ce Merge pull request #123 from wasmerio/feature/readd-wasi-tests
Readd WASI tests
2020-06-24 14:47:34 -07:00
Mark McCaskey
b1dcaf0cfe Fix up ignores file 2020-06-24 14:29:28 -07:00
Mark McCaskey
e5c4e6a6e2 Attempt to ignore some WASI tests on windows 2020-06-24 12:47:50 -07:00
Mark McCaskey
00e915961e Normalize line endings on Windows in WASI tests 2020-06-24 11:32:25 -07:00
Mark McCaskey
6d4cbd1414 Merge commit 'bc376544cf1ea8dcff406f9d621f390a668183ea' as 'tests/wasi-wast' 2020-06-24 11:00:55 -07:00
Mark McCaskey
bc376544cf Squashed 'tests/wasi-wast/' content from commit e1fec5d
git-subtree-dir: tests/wasi-wast
git-subtree-split: e1fec5d973e78714beff6037460aee309cb158e8
2020-06-24 11:00:55 -07:00
Mark McCaskey
4661e27874 Delete wasi-wast directory because it wasn't created as a subtree 2020-06-24 11:00:39 -07:00
Mark McCaskey
81eb1b471c Add support for new temp_dirs directive in WASI WAST 2020-06-24 10:58:25 -07:00
Mark McCaskey
c28f5a72fb Add updates from feedback, clean up WASI test naming 2020-06-23 16:22:33 -07:00
Mark McCaskey
3a574be5c5 Merge commit '8fad793a10346333e7e692cb0ff3e5d00725c9f2' into feature/readd-wasi-tests 2020-06-23 15:32:28 -07:00
Mark McCaskey
8fad793a10 Squashed 'tests/wasi/' changes from 8719b7e..85bb94e
85bb94e Add more fixes and updates to the WASI tests

git-subtree-dir: tests/wasi
git-subtree-split: 85bb94eeea9cdc27150777068a71d7198dda56e5
2020-06-23 15:32:28 -07:00
Mark McCaskey
a0ee282f59 Fix up some more WASI tests 2020-06-23 15:31:03 -07:00
Mark McCaskey
43d5d87b66 Squashed 'tests/wasi/' changes from 30a26ce..8719b7e
8719b7e Change test output filename from `.out` to `.wast`

git-subtree-dir: tests/wasi
git-subtree-split: 8719b7ef3c5ee90043df8f0216cff35ae4e275c3
2020-06-23 12:09:09 -07:00
Mark McCaskey
c5fec72e23 Merge commit '43d5d87b66d4fb682c46f753620a72a4fe0f3217' into feature/readd-wasi-tests 2020-06-23 12:09:09 -07:00
Mark McCaskey
b068df84ac Add minor fixes for CI 2020-06-23 12:07:13 -07:00