Commit Graph

198 Commits

Author SHA1 Message Date
ptitSeb
f8c0910c33 Update wasmparser to v0.95 (#3682)
* Update wasmparser to v0.95

* Update lib/compiler/src/translator/module.rs

Co-authored-by: Syrus Akbary <me@syrusakbary.com>

---------

Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2023-03-15 11:15:58 +01:00
Christoph Herzog
ee58d7c2b2 Revert "Update wasmparser to v0.91"
This reverts commit 87232623de.
2023-03-15 01:46:26 +01:00
ptitSeb
87232623de Update wasmparser to v0.91 2023-03-14 20:39:38 +01:00
Syrus Akbary
f342ebe821 Fix serialization 2023-02-27 23:49:08 -08:00
Christoph Herzog
7f8c0858b3 Merge remote-tracking branch 'origin/master' into wasix 2023-02-07 11:38:04 +01:00
ptitSeb
1387363a7b Fix/compile not in memory (#3573)
* Example of allocated artifact
* Better error when Instancing fail because of OS/Arch issue
* Add missing brnach for new error
---------

Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2023-02-06 10:28:39 +01:00
Christoph Herzog
a6fa558e8a Merge branch 'wasix-core-changes' into wasix 2022-12-27 15:08:37 +01:00
Christoph Herzog
cfa3bf4200 Merge remote-tracking branch 'origin/master' into wasix-core-changes 2022-12-22 13:51:14 +01:00
Felix Schütt
b24025ad01 cargo clippy --fix --all 2022-12-21 00:49:45 +01:00
Christoph Herzog
5109a407c4 WASIX Preparation
This commit extracts changes to core libraries made in the WASIX branch.

It is not reasonable to extract the partial commit history, so this is
just a batch commit.

The history will make a bit more sense again if we decide to merge the
WASIX branch with full commit history.
2022-12-16 11:47:04 +01:00
Christoph Herzog
173e48601c Merge remote-tracking branch 'origin/master' into wasix 2022-12-13 01:40:22 +01:00
ptitSeb
de03d35205 Added test for singlepass arm64 'sub xsp, xsp, reg' emitter fix 2022-12-09 14:32:13 +01:00
Christoph Herzog
976c7f7958 Fix compile errors after merge 2022-12-06 14:57:50 +01:00
Christoph Herzog
eb60a96bcf Merge branch 'master' into wasix-merge 2022-12-06 13:22:09 +01:00
ptitSeb
3144ef2b3d Enable threads/imports test, but disabling multiple table individual tests as it's not yet supported 2022-11-22 16:01:25 +01:00
Michael-F-Bryan
3a092cf6f9 Make "make lint" pass for Rust 1.63 2022-11-18 00:43:54 +08:00
John Sharratt's Shared Account
572ea3e9cd Changes required to bring in full WASIX support
- Implemented multi-threading for both JS and SYS, plus other WASIX implementations
- Added a longjmp capability required for bash and other WASIX implementations
- Added real signals to WASIX
- Added a stack unwinding and winding functionality
- Implemented memory forking which will be used for process forking
- Added the ability to fork the current process
- Added the vfork functionality
- Moved over to the WasiPipe implementation
- Added more syscalls needed for bash on WASIX
- Ported wasmer-os into wasmer
- Added a union file system and the character devices
- Moved the cursors to the file handles rather than the file so that they are multithread safe and can handle concurrent IO
- Reimplemented the poll_oneoff functionality to support full ASYNC
- Added support for mapping directories in the host file system into WASIX sandbox file systems
- Implemented fully ASYNC sockets and emulated ASYNC files
- Made the file locks more granular to allow for concurrent poll and accept operations
- Fixed a race condition on the event notifications
2022-11-07 15:11:29 +01:00
Gregory Sobol
25d6a49f1c fmt 2022-10-05 18:42:38 +03:00
Gregory Sobol
7b49e4d6d6 fix popcnt for m1 and add test 2022-09-30 17:02:30 +03:00
ptitSeb
2752f7d390 More rollback fixes 2022-09-01 18:02:14 +02:00
ptitSeb
436bec735b Using IntoBytes only for Module::deserialise (both sys and js) 2022-09-01 13:52:53 +02:00
ptitSeb
1912373e1f The API breaking changes from future WASIX/Network/Threading addition 2022-08-26 10:46:56 +02:00
Felix Schütt
18abab157c Add sanity test for Artifact::deserialize 2022-08-23 16:56:16 +02:00
Wolfgang Silbermayr
89bba319a9 No longer require FunctionEnvMut for new_typed(…) callback function 2022-08-05 14:27:44 +02:00
Wolfgang Silbermayr
566c897e57 Remove FunctionEnvMut for Function::new(…) 2022-08-05 14:27:44 +02:00
Wolfgang Silbermayr
7df3e3ca23 Rename {native,typed} functions, reintroduce *_with_env variants 2022-08-05 14:27:44 +02:00
John Sharratt's Shared Account
5aa356f222 Fixed a memory corruption issue with JS memory operations that were reusing invalid views 2022-07-31 20:31:41 +10:00
Syrus Akbary
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
Manos Pitsidianakis
214346af3b Merge Backend into EngineBuilder and refactor feature flags 2022-07-27 21:03:24 +03:00
Manos Pitsidianakis
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
Manos Pitsidianakis
51be5d0860 Rename UniversalEngine to Engine 2022-07-25 13:21:41 +03:00
Manos Pitsidianakis
987a90c0dc Remove Engine trait 2022-07-25 13:19:32 +03:00
Syrus Akbary
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
ptitSeb
267a09ce8e Migrate compiler tests to the new Context API 2022-07-19 15:31:51 +03:00
Manos Pitsidianakis
168e330260 Renamed get_native_function to get_typed_function, marked former as deprecated. 2022-07-19 15:31:51 +03:00
Amanieu d'Antras
9e53e70767 Rework the way the Context is passed into function using it 2022-07-19 15:31:51 +03:00
Manos Pitsidianakis
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
Manos Pitsidianakis
c9baa6e451 tests/compilers: remove Engine configuration
Since there's only one Engine now.
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
086205bfcc Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler 2022-06-16 16:57:45 +03:00
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