Commit Graph

803 Commits

Author SHA1 Message Date
bb9f95b2f8 Revert "Lower libwasmer headless size" 2022-08-23 15:04:55 +02:00
57d918e3f5 Bring libwasmer-headless.a from 22MiB to 7.2MiB (on my machine)
By using lto optimization flags.

A qjs.wasm executable using the headless engine now weights 4.6MiB:

% du -sh qjs-he*.out
 20M    qjs-headfull.out
4.6M    qjs-headless.out
2022-08-21 16:19:08 +03:00
45d60884c2 create-exe: add static artifact load feature to libwasmer headless 2022-08-12 18:27:54 +03:00
c570b1471a Bump version to 3.0.0-beta in Cargo manifests 2022-08-08 19:56:35 +03:00
7df3e3ca23 Rename {native,typed} functions, reintroduce *_with_env variants 2022-08-05 14:27:44 +02:00
dce55432e6 Merge pull request #3052 from john-sharratt/master
Fixed a memory corruption issue with JS memory operations that were r…
2022-08-04 13:44:39 +02:00
83a97f5533 cli: add create-obj command
lib/compiler: read static object
2022-08-03 10:37:45 +03:00
430a7e2e19 Make serde optional everywhere with enable-serde feature flag 2022-08-02 15:45:28 +03:00
6074045514 Merge branch 'master' into master 2022-07-31 22:01:38 +10:00
5aa356f222 Fixed a memory corruption issue with JS memory operations that were reusing invalid views 2022-07-31 20:31:41 +10:00
b37029e437 Run cargo fmt 2022-07-30 11:31:10 +03:00
5ab5d7f963 Fix typo in map_feature_as_c_define macro 2022-07-30 11:31:10 +03:00
9f1845a2d1 Fix clippy lints and "make lint" 2022-07-30 11:31:10 +03:00
011d36829a Bump 3.0.0-alpha.3 to 3.0.0-alpha.4 2022-07-30 11:31:08 +03:00
1c3ffffe46 Bump 3.0.0-alpha.2 to 3.0.0-alpha.3 2022-07-30 11:30:45 +03:00
02ee80cf10 Bump version to 3.0.0-alpha.2 2022-07-30 11:30:07 +03:00
6c045bff10 Bump version to 3.0.0-alpha.1 to fix botched compiler crate 2022-07-30 11:29:41 +03:00
8959008403 Update version to 3.0.0-alpha 2022-07-30 11:29:05 +03:00
8215b65494 cli: initialize wasienv memory in create-exe 2022-07-29 10:40:31 +03:00
4384ddf9cd Improved EngineBuilder and Store API
- Store::new() now takes an impl Into<Engine>.
- Added Into<Engine> impls in each of the compilers
- Updated docs/migration_to_3.0.0.md on API usage
2022-07-28 15:20:26 +03:00
214346af3b Merge Backend into EngineBuilder and refactor feature flags 2022-07-27 21:03:24 +03:00
924d2dcf4e Remove Universal mentions from cargo features 2022-07-25 14:45:27 +03:00
b15e8c2e4e Refactor last traces of "Universal" nomenclature 2022-07-25 13:23:16 +03:00
4a06b1d3f6 Rename engine's Universal type to Backend
The Universal type was essentially a builder of engines that's given a
compiler backend and creates an Engine with .engine() method. The name
was not clear.
2022-07-25 13:23:13 +03:00
51be5d0860 Rename UniversalEngine to Engine 2022-07-25 13:21:41 +03:00
987a90c0dc Remove Engine trait 2022-07-25 13:19:32 +03:00
a419ccdf52 Move Webassembly objects to Store and remove Context
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
eed0327101 Update c-api examples to Context API 2022-07-19 15:31:51 +03:00
62f07efb08 c-api: Add wasm_*_same functions to global,memory,table 2022-07-19 15:31:51 +03:00
34a6511e16 Port C API to new Context API 2022-07-19 15:31:51 +03:00
0417111ada lib/c-api: update cbindgen dependency 2022-07-19 15:31:51 +03:00
d3d363bab2 Migrated WASI and WAST to Wasmer 3.0 API
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
738a66f719 Implement the new Context API for the core API
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
2022-07-19 15:31:51 +03:00
c55cee41a5 Upgrade enumset minimum version to one that compiles 2022-06-29 20:32:29 +03:00
f744bac1a2 Store: replace new() with new_with_engine() and make new() take CompilerConfig
Since there's one engine now, it doesn't make sense to initialize a
`Store` with the engine specifically. It's an extra redundant step for
the API user.
2022-06-16 16:57:45 +03:00
086205bfcc Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler 2022-06-16 16:57:45 +03:00
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