Commit Graph

767 Commits

Author SHA1 Message Date
a6173f9746 Remove wasmer-{artifact,engine} and merge it into wasmer-compiler and wasmer-vm 2022-06-16 16:57:45 +03:00
feee4e3587 Move wasmer_compiler errors to wasmer_types error module 2022-06-16 16:57:45 +03:00
8be0089893 Remove engine-staticlib 2022-06-16 16:57:45 +03:00
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
0cd9dfe3e0 Fixed linter warnings/errors 2022-06-15 19:26:57 +03:00
b0709e4153 Implemented multithreading and fixed a number of bugs with WASIX 2022-06-15 19:26:57 +03:00
62de9c5aad Implemented functionality needed for WASIX and Networking within Web Assembly
- Introduced the virtual BUS interface used for RPC between web assembly apps
- Introduced the virtual networking interface used to implement networking
  for web assembly apps
- Implemented a local implementation of the virtual networking
  (available behind the feature toggle 'host-net' on the 'wasi' package)
- Fixed up some of the examples from the wasmer3 branch
- Refactored the WASI implementations so they support wasm64-wasi
- WASIX is behind its own namespaces for both 32bit and 64bit implementations
- Fixed the wasi_pipes unit test which was using internals that are no longer exposed - instead made the pipes clonable
2022-06-15 19:24:40 +03:00
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
5339f7cdae Fix clippy lints
Fixes: #2926
2022-06-09 16:05:53 +02:00
8aa225a192 api/sys: Replace ImportObject with new type Imports 2022-06-08 14:09:40 +03:00
714bac5650 Redesign the API for accessing the contents of a Wasm memory 2022-06-08 14:09:38 +03:00
33654c1a1d Release version 2.3.0 2022-06-06 22:27:57 +03:00
27702a1c6d Fix conditional build for get_default_compiler_config of C-Api (for #2839) 2022-05-12 22:33:57 +03:00
b6cc09d514 lib/c-api: fix env_finalizer being called everytime WrapperEnv was dropped
We would like to run the environment finalizer callback only when the
last reference to env pointer is dropped, which is when the Arc<_>
reference count is one.

Closes #2871
2022-05-06 21:53:09 +03:00
77af8ba634 Fix some clippy lints
Before:
```
% make lint 2>&1 | grep warnings | sort | uniq
error: could not compile `wasmer-cli` due to previous error; 25 warnings emitted
warning: `compiler-test-derive` (lib) generated 8 warnings
warning: `test-generator` (lib) generated 4 warnings
warning: `wasi-test-generator` (bin "wasi-test-generator") generated 8 warnings
warning: `wasmer-cache` (lib) generated 4 warnings
warning: `wasmer-cli` (lib) generated 25 warnings
warning: `wasmer-compiler-cranelift` (lib) generated 50 warnings
warning: `wasmer-compiler-singlepass` (lib) generated 228 warnings
warning: `wasmer-compiler` (lib) generated 3 warnings
warning: `wasmer-emscripten` (lib) generated 182 warnings
warning: `wasmer-engine-dummy` (lib) generated 6 warnings
warning: `wasmer-engine-dylib` (lib) generated 37 warnings
warning: `wasmer-engine-staticlib` (lib) generated 16 warnings
warning: `wasmer-engine-staticlib` (lib) generated 7 warnings
warning: `wasmer-engine-universal` (lib) generated 11 warnings
warning: `wasmer-engine` (lib) generated 15 warnings
warning: `wasmer-object` (lib) generated 5 warnings
warning: `wasmer-types` (lib) generated 31 warnings
warning: `wasmer-vfs` (lib) generated 4 warnings
warning: `wasmer-vm` (lib) generated 40 warnings
warning: `wasmer-wasi-experimental-io-devices` (lib) generated 11 warnings
warning: `wasmer-wasi-types` (lib) generated 3 warnings
warning: `wasmer-wasi` (lib) generated 13 warnings
warning: `wasmer-wast` (lib) generated 11 warnings
warning: `wasmer` (lib) generated 54 warnings
```

After:
```
warning: `wasmer-cli` (lib) generated 16 warnings
warning: `wasmer-compiler-cranelift` (lib) generated 48 warnings
warning: `wasmer-compiler-singlepass` (lib) generated 213 warnings
warning: `wasmer-emscripten` (lib) generated 170 warnings
warning: `wasmer-engine-dummy` (lib) generated 6 warnings
warning: `wasmer-engine-dylib` (lib) generated 4 warnings
warning: `wasmer-engine-staticlib` (lib) generated 14 warnings
warning: `wasmer-engine-staticlib` (lib) generated 5 warnings
warning: `wasmer-engine-universal` (lib) generated 9 warnings
warning: `wasmer-engine` (lib) generated 12 warnings
warning: `wasmer-object` (lib) generated 3 warnings
warning: `wasmer-types` (lib) generated 7 warnings
warning: `wasmer-vm` (lib) generated 36 warnings
warning: `wasmer-wasi-experimental-io-devices` (lib) generated 6 warnings
warning: `wasmer-wasi-types` (lib) generated 3 warnings
warning: `wasmer-wasi` (lib) generated 9 warnings
warning: `wasmer-wast` (lib) generated 9 warnings
warning: `wasmer` (lib) generated 42 warnings
```
2022-04-20 18:25:04 +03:00
8ec6acb52e Update wasmer_parser_operator_t for wasmparser 0.83 2022-04-06 21:08:34 +01:00
fe9d2d8d22 Release version 2.2.1 2022-03-15 11:02:31 +00:00
4dd1634218 Release version 2.2.0 2022-02-28 17:19:14 +00:00
15f9d2646f Release version 2.2.0-rc1 2022-02-15 19:10:24 +00:00
729bb135ae Fix the "--cflags" part of "wasmer config" in README.md 2022-01-28 21:54:11 +01:00
4e27e1164c Release version 2.2.0-rc1 2022-01-27 23:59:27 +00:00
fb7a572415 Use exact version for Wasmer crate dependencies
We don't guarantee API compatibility between internal Wasmer crates when
making minor version bumps.
2022-01-19 21:35:09 +00:00
ebcea4a5c4 Release v2.1.1 2021-12-21 12:19:50 +01:00
0f96392966 Update C API development docs 2021-12-13 10:59:34 +00:00
4dfe84c4d1 Fix wasm_importtype_new's Rust signature to not assume boxed vectors
Fixes #2718
2021-12-13 00:33:55 +00:00
2ed70bdebf Make C-API and Wasi dependencies more lean 2021-12-02 12:58:19 +01:00
c650ffea33 Version 2.1.0 2021-11-30 23:46:54 +00:00
cb6aa9b1b9 Update changelog 2021-11-30 22:06:35 +00:00
af29488bf9 Undo breaking change in C API 2021-11-23 17:59:31 +00:00
e2c6a39d37 Clean up error handling in the C API 2021-11-23 16:11:26 +00:00
a603c33def Validate that CPU features are supported when instantiating a module 2021-11-23 15:21:34 +00:00
724c59c751 More bug fixes 2021-11-17 00:03:28 +00:00
75cb5ab788 Refactor the C API to eliminate memory leaks 2021-11-15 17:01:28 +00:00
cff3e18a34 Fix memory leaks in C API examples 2021-11-15 17:01:28 +00:00
88f1b19ff1 Revert "feat(c-api) Create OrderedResolver from a parallel iterator."
This reverts commit 446a76312b.
2021-11-15 17:01:28 +00:00
0a529f1513 Remove wasmer.h from git since it is auto-generated at build time 2021-10-19 16:19:39 +01:00
860b414b02 fix segment fault in c-api Example
the result from wasm_extern_as_func was not marked as "own"
`sum_func` was not owned by itself, delete it will cause a double free
2021-10-18 01:25:29 +08:00
167d9268eb Merge branch 'master' into js-api-wasi 2021-08-30 12:04:27 +02:00
f09fb3e896 Improved headless support on c-api 2021-08-21 10:21:37 +01:00
21a8ca3945 Add iOS test 2021-08-21 10:21:37 +01:00
f1878eb702 Switch back to using wasmer_api::wasmerparser dependency. 2021-08-21 10:21:37 +01:00
e038914eea Add compiler flags around wasmer_compiler_t bug 2021-08-21 10:21:37 +01:00
7798daf6c4 Remove cargo changes 2021-08-21 10:21:37 +01:00
6ddc2f6454 Add iOS support for Headless Wasmer 2021-08-21 10:21:37 +01:00
5b53c5497a fix(c-api,cli) Use the default features from wasmer-wasi.
`wasmer-wasi`'s default features don't change, except that it adds
`host_fs` in the default features, which maps to
`wasmer-vfs/host_fs`. It then ensures that the same behavior is
guaranteed.

We don't need to change how `wasmer-cli` and `wasmer-c-api` fetch
`wasmer-wasi` in this case.
2021-08-16 15:54:19 +02:00
70b70724c5 doc(changelog) Add #2521. 2021-08-16 15:18:36 +02:00
446a76312b feat(c-api) Create OrderedResolver from a parallel iterator.
This patch adds `rayon` to `wasmer-c-api` so that we can create an
`OrderedResolver` from a `ParallelIterator`. For modules with a long
list of imports, it's interesting to parallelize the work.
2021-08-16 14:38:35 +02:00
7e91448838 doc(c-api) Fix link to the documentation 2021-08-12 14:08:19 +02:00
fa1c634397 Merge branch 'master' into js-api-wasi-base 2021-07-30 10:32:39 -07:00
75142b3871 DOCS: Make wasm_limits_t members publicly visible.
Issue 2485
2021-07-28 12:50:15 -04:00