Commit Graph

159 Commits

Author SHA1 Message Date
Manos Pitsidianakis
a6173f9746 Remove wasmer-{artifact,engine} and merge it into wasmer-compiler and wasmer-vm 2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
ptitSeb
0cd9dfe3e0 Fixed linter warnings/errors 2022-06-15 19:26:57 +03:00
ptitSeb
3e9de243a5 Fix lint warnings/errors 2022-06-15 19:26:57 +03:00
Johnathan Sharratt
7c532813e7 Multiple changes required to implement the wasmer terminal on the browser
- Split functionality out of WasiEnv so that it can support multi-threading
- Added methods to the VFS File Trait that supporting polling
- Implemented basic time functionality for WASI
- Incorported a yield callback for when WASI processes idle
- Improved the error handling on WASI IO calls
- Reduce the verbose logging on some critical WASI calls (write/read)
- Implemented the missing poll functionality for WASI processes
- Moved the syspoll functionality behind a feature flag to default to WASI method
- Refactored the thread sleeping functionality for WASI processes
- Fixed the files system benchmark which was not compiling
- Modified the file system trait so that it is SYNC and thus can handle multiple threads
- Removed the large mutex around filesystem state and implemented granular locks instead
  (this is needed to fix a deadlock scenario on the terminal)
- Split the inodes object apart from the state to fix the deadlock scenario.
- Few minor fixes to some warnings when not using certain features
- Sleeping will now call a callback that can be used by the runtime operator when
  a WASI thread goes to sleep (for instance to do other work)
- Fixed a bug where paths that exist on the real file system are leaking into VFS
- Timing functions now properly return a time precision on WASI
- Some improved macros for error handling within syscalls (wasi_try_ok!)
- Refactored the remove_directory WASI function which was not working properly
- Refactored the unlink WASI function which was not working properly
- Refactored the poll WASI function which was not working properly
- Updates some of the tests to make them compile again
- Rewrote the OutputCapturer so that it does leak into the internals
2022-06-15 12:00:24 +02:00
Wolfgang Silbermayr
da4e9fe617 Rename NativeFunc to TypedFunction
Closes: #2915
2022-06-08 14:12:51 +03:00
Manos Pitsidianakis
00f9a3c8d7 Remove loupe dependency
Closes #2731
Closes #2744
2022-06-08 14:12:49 +03:00
Manos Pitsidianakis
8aa225a192 api/sys: Replace ImportObject with new type Imports 2022-06-08 14:09:40 +03:00
Manos Pitsidianakis
008c6720d7 tests/compilers/issues.rs: update broken Memory API usage 2022-06-08 14:09:40 +03:00
Amanieu d'Antras
683c3688d4 Update spec test workaround for singlepass
This is necessary for singlepass which doesn't support multi-value yet.
2022-04-06 20:48:43 +01:00
Amanieu d'Antras
3d52bf2f8f Don't try generating a backtrace on stack overflow 2022-03-14 22:14:22 +00:00
Simonas Kazlauskas
13a926adc6 regression test for GPR exhaustion during calls 2022-01-24 20:37:28 +02:00
Simonas Kazlauskas
6dc24623e3 Regression test for #2721
The wasm snippet in the test corresponds to roughly:

```rust
let name = "bananapeach";
banana(a, b, c, name.len() as _, name.as_ptr() as _, f, g, h);
```

however sometime between 2.0 and 2.1 the name pointer is no longer being
passed through as an argument. Instead a 0 gets passed in.

To make things weirder, if `name.as_ptr()` is passed through multiple
times, the second time the pointer will get passed correctly.
2021-12-14 14:44:51 +02:00
bors[bot]
8f2e49d528 Merge #2693
2693: Add extra validation to compilers & engines r=ptitSeb a=Amanieu

- Cranelift and singlepass now properly cross-compile with no dependency on the host target.
- Staticlib engine now panics if you try to run a freshly compiled module.
- CPU features used when a module was compiled are now checked against the host CPU features during instantiation.

Fixes #1567
Fixes #2590 

Co-authored-by: Amanieu d'Antras <amanieu@gmail.com>
2021-11-23 19:48:25 +00:00
Amanieu d'Antras
a603c33def Validate that CPU features are supported when instantiating a module 2021-11-23 15:21:34 +00:00
Anbang Wen
b32e8d92c1 add a compiler test to check for deterministic
This is to test #2173, the empty test always pass while the table one
fails sometimes.
2021-11-22 15:49:11 +00:00
Benjamin Coenen
e0e12f9d9f feat(wasi): add rename for a directory + fix remove_dir
Signed-off-by: Benjamin Coenen <5719034+bnjjj@users.noreply.github.com>
2021-09-07 13:55:24 +02:00
Ivan Enderlin
971915a8c1 test(wasi) Run the WASI test suites with the in-memory FS.
This PR updates how we generate the WASI test suites to test against
the `wasmer_vfs::host_fs` (the default), and `wasmer_vfs::mem_fs`
(that's new).
2021-08-31 11:26:14 +02:00
Syrus Akbary
e0fce0ae9d Use test that trigger issue 2021-07-28 17:05:46 -07:00
Syrus Akbary
69cdfbb134 Added issues to test in compilers 2021-07-28 14:41:22 -07:00
chenyukang
d9b53d8792 allow unreachable_patterns in config 2021-06-08 16:03:20 +08:00
Ivan Enderlin
3d66a2e360 feat: Rename wasmer-engine-native to wasmer-engine-dylib. 2021-05-28 14:13:24 +02:00
Ivan Enderlin
79d5f20301 feat: Rename wasmer-engine-native to wasmer-engine-shared-object. 2021-05-28 14:13:24 +02:00
Ivan Enderlin
e5a784a006 feat: Rename wasmer-engine-jit to wasmer-engine-universal.
This (small) patch renames the `wasmer-engine-jit` crate into
`wasmer-engine-universal`.
2021-05-25 16:12:06 +02:00
Syrus Akbary
5b1fabc4ac Fixed issues 2021-05-19 20:20:32 -05:00
Syrus Akbary
67188ed41b Added serial test macro for serial tests 2021-05-19 13:09:47 -07:00
Syrus Akbary
0c654445b1 Fixed ignored tests 2021-05-18 15:34:31 -07:00
Syrus Akbary
2e90db6967 Addressed comments 2021-05-18 14:32:21 -07:00
Syrus
892fd1f053 Fixed tests 2021-05-16 11:36:58 -07:00
Syrus Akbary
27467048d9 Reenabled missing tests 2021-05-15 21:31:30 -07:00
Syrus
2316c54ebf Fixed issue with features 2021-05-15 21:03:13 -07:00
Syrus Akbary
c9e66a1ddf Fix singlepass 2021-05-15 20:51:14 -07:00
Syrus Akbary
c2e11d8499 Compiler Test refactor now fully works 2021-05-15 20:34:21 -07:00
Syrus
a7367ea7e2 Fixed lint 2021-05-01 00:42:53 -07:00
Syrus
19ec7edb26 Added extra test to verify that works 2021-05-01 00:41:41 -07:00
Mark McCaskey
20758ea8af Update wasmparser to 0.77 2021-04-29 09:22:14 -07:00
Ivan Enderlin
c212f74e19 test: Implement MemoryUsage on test middlewares. 2021-03-22 15:35:22 +01:00
jubianchi
5962d3fd4c chore: Fix errors to be able to build on musl
Closes #1482
Closes #1766
2021-01-27 21:05:15 +01:00
Nick Lewycky
5892d06a44 Fix lint warnings about unnecessary trailing semicolons. 2021-01-21 22:15:20 -08:00
Syrus Akbary
52b62d63d7 Added support for LLVM 11 and improved Apple Silicon 2021-01-11 19:38:15 -08:00
Simon Warta
df74a4812c Create dedicated MiddlewareError 2020-12-23 00:07:00 +01:00
Simon Warta
c41451a547 Replace wasmparser::Result with wasmer::WasmResult in middleware 2020-12-23 00:07:00 +01:00
Mark McCaskey
6a2116917f Fix up tests, make WasmerEnv: Send 2020-12-15 13:35:19 -08:00
Mark McCaskey
62d15fae36 Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-15 08:37:18 -08:00
Simon Warta
69f834a9e8 Accept Into<FunctionType> as signatures 2020-12-14 13:08:15 +01:00
Mark McCaskey
6e95c50dc2 Address feedback 2020-12-08 11:02:26 -08:00
Mark McCaskey
476e8d1cd6 Merge branch 'master' into fix/host-func-env-memory-leak 2020-12-07 11:06:01 -08:00
Syrus Akbary
c76bb9824c Remove unused else in wast check 2020-12-06 12:39:15 -08:00
Mark McCaskey
e43d9d2732 Experimental: clone host envs during construction 2020-12-04 16:04:03 -08:00
Syrus
13e6f29c29 Set compiler config to be owned (following wasm-c-api) 2020-12-04 02:39:19 -08:00