Manos Pitsidianakis
a02ff59a0f
cli: re-introduce create-exe functionality
2022-07-29 10:40:23 +03: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
Syrus Akbary
abed65f074
Added hashing to the StoreHandle and Funciton env in wasmer-js
2022-07-26 09:54:58 -07:00
Syrus Akbary
eb9e73d3aa
Improvedf hashing/ids of function envs
2022-07-25 14:38:42 -07:00
Manos Pitsidianakis
924d2dcf4e
Remove Universal mentions from cargo features
2022-07-25 14:45:27 +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
b9ab9515c1
Remove Module::artifact()
...
Closes #2637
2022-07-25 13:21:43 +03:00
Manos Pitsidianakis
c2ecb99142
Rename UniversalArtifact to Artifact
2022-07-25 13:21:43 +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
Manos Pitsidianakis
187d2e6364
Remove Artifact trait
...
In favor of using UniversalArtifact everywhere
2022-07-25 13:13:52 +03:00
Manos Pitsidianakis
37773f29d7
Store/create Arc<ModuleInfo> in Module on Instantiation
...
Instead of accessing Arc<ModuleInfo> from the artifact a module was
instantiated from, create a copy from it in each instantiated module.
2022-07-25 13:13:52 +03:00
Manos Pitsidianakis
73200b9d46
Remove cranelift dependency from wasmer-wasi
2022-07-20 16:40:58 +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
ptitSeb
de384bb9cc
Fixed residual package-doc issues
2022-07-19 15:25:24 +02:00
ptitSeb
97732351d4
Added back Memory::data_unchecked and Memory::data_unchecked_mut as hidden (for wit-bindgen)
2022-07-19 15:31:51 +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
Manos Pitsidianakis
62f07efb08
c-api: Add wasm_*_same functions to global,memory,table
2022-07-19 15:31:51 +03:00
Manos Pitsidianakis
34a6511e16
Port C API to new Context API
2022-07-19 15:31:51 +03:00
ptitSeb
d12759f150
Migrated internal samples to new Context API
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
6c089bbc45
Port JS API 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
9e53e70767
Rework the way the Context is passed into function using it
2022-07-19 15:31:51 +03:00
Amanieu d'Antras
35d06ec3f2
Ensure that Wasm function call parameters all come from the same context
2022-07-19 15:31:51 +03:00
Amanieu d'Antras
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
Felix Schütt
220751a035
Remove RuntimeError::raise from public API
2022-07-05 14:12:58 +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
a6173f9746
Remove wasmer-{artifact,engine} and merge it into wasmer-compiler and wasmer-vm
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
25057c8f63
Move wasmer_artifact errors to wasmer_types error module
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
feee4e3587
Move wasmer_compiler errors to wasmer_types error module
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
8be0089893
Remove engine-staticlib
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
68e98e216d
Put back uint8view as hidden public instead of private
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
5339f7cdae
Fix clippy lints
...
Fixes : #2926
2022-06-09 16:05:53 +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
92b7cb01b5
api/js: Replace ImportObject with new type Imports
2022-06-08 14:09:40 +03:00
Manos Pitsidianakis
8aa225a192
api/sys: Replace ImportObject with new type Imports
2022-06-08 14:09:40 +03:00
Amanieu d'Antras
dd7808b534
Use thiserror for MemoryAccessError
2022-06-08 14:09:40 +03:00
Amanieu d'Antras
d94745c9fc
Cache the JS memory view
2022-06-08 14:09:40 +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
ptitSeb
63538477f2
Moved is_wasm function from api to types crate
2022-05-03 09:32:34 +02:00
Manos Pitsidianakis
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