Commit Graph

258 Commits

Author SHA1 Message Date
Felix Schütt
0e5b55f845 Set blocking = false for all tests 2022-09-19 14:19:16 +02:00
Felix Schütt
64399973e3 Reexport WasiBidirectionalSharedPipePair as Pipe 2022-09-19 11:39:00 +02:00
Felix Schütt
0e53d2d19b Rename WasiPipePair -> WasiBidirectionalPipePair 2022-09-19 11:17:29 +02:00
Felix Schütt
c4a16ae682 Fix WasiPipe + examples 2022-09-09 15:31:57 +02:00
Felix Schütt
36f4c44c6c Fix typo 2022-08-23 15:32:18 +02:00
Wolfgang Silbermayr
9c7b4343ea rustfmt 2022-08-05 14:27:44 +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
8ff164036d Removed uint8view() from the memory API and redundant FunctionEnv in tests 2022-08-02 11:33:49 +10: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
187d2e6364 Remove Artifact trait
In favor of using UniversalArtifact everywhere
2022-07-25 13:13:52 +03:00
Syrus Akbary
43138b569c Rename all mentions from ctx to store
Updated tests and examples

Improved a bit the function types and results
2022-07-20 01:55:04 +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
274aa3e167 Migrated al examples to 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
1c578fa893 Update hello_world.rs example 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
086205bfcc Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler 2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
Johnathan Sharratt
b0709e4153 Implemented multithreading and fixed a number of bugs with WASIX 2022-06-15 19:26:57 +03:00
ptitSeb
3e9de243a5 Fix lint warnings/errors 2022-06-15 19:26:57 +03:00
Johnathan Sharratt
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
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
Amanieu d'Antras
714bac5650 Redesign the API for accessing the contents of a Wasm memory 2022-06-08 14:09:38 +03:00
Amanieu d'Antras
477bec75e1 Fix exports_memory example 2022-04-06 20:48:43 +01:00
Amanieu d'Antras
fefde7beab Disable test for the table example because it is broken 2022-01-04 16:23:49 +01:00
Amanieu d'Antras
cb558c4e3a Ensure all examples are tested in both debug and release modes 2022-01-04 16:23:49 +01:00
Amanieu d'Antras
4924a7c22a Update examples that use RuntimeError::custom to use return a custom
error type directly.
2021-12-20 16:27:24 +01:00
Amanieu d'Antras
17c0834abf Replace RuntimeError::raise with RuntimeError::custom 2021-12-18 00:34:44 +01:00
Alexey Shekhirin
2a4ac7a135 chore(examples, emscripten): fix warnings 2021-08-28 19:45:09 +03:00
Syrus Akbary
ca513fcd87 Fixed iOS target in example 2021-08-21 10:21:37 +01:00
Nathan Horrigan
774286f297 Flatten imports 2021-08-21 10:21:37 +01:00
Nathan Horrigan
21a8ca3945 Add iOS test 2021-08-21 10:21:37 +01:00
Nathan Horrigan
486b93b8a4 Only run target ios test on macos 2021-08-21 10:21:37 +01:00
Nathan Horrigan
3eb825694b Add description to platform_ios_headless.rs 2021-08-21 10:21:37 +01:00
Nathan Horrigan
3280120204 Rename iOS example file 2021-08-21 10:21:37 +01:00
Nathan Horrigan
3213004fa8 Clean up ios example 2021-08-21 10:21:37 +01:00
Nathan Horrigan
bc58198032 Add custom linker flags for iOS 2021-08-21 10:21:37 +01:00
Nathan Horrigan
df5b90bc8c Add dedicated iOS example file 2021-08-21 10:21:37 +01:00
Nathan Horrigan
0d2194df1d Revert engine_headless.rs 2021-08-21 10:21:37 +01:00
Nathan Horrigan
6ddc2f6454 Add iOS support for Headless Wasmer 2021-08-21 10:21:37 +01:00
yukang
690eac9674 fix doc typo 2021-06-08 19:53:32 +08:00
Ivan Enderlin
3d66a2e360 feat: Rename wasmer-engine-native to wasmer-engine-dylib. 2021-05-28 14:13:24 +02:00