Commit Graph

9362 Commits

Author SHA1 Message Date
Christoph Herzog
43fb0ccb23 refactor(wasi): Rename WasiThreadGuard to WasiThreadRunGuard
The name is more descriptive, since the guard is only supposed to use by
code invoking the Wasm code.
2023-03-02 09:43:04 +00:00
Syrus Akbary
cbdf356c0b Merge branch 'std-api' into wasix-fixes-for-web-with-unification
# Conflicts:
#	lib/api/src/js/externals/global.rs
#	lib/api/src/js/vm.rs
#	lib/wasi/src/bin_factory/exec.rs
#	lib/wasi/src/bin_factory/module_cache.rs
#	lib/wasi/src/runtime/task_manager/mod.rs
2023-03-01 21:16:18 -08:00
Johnathan Sharratt
2511d65830 Merge branch 'master' into wasix-fixes-for-web 2023-03-02 03:53:18 +01:00
Johnathan Sharratt
06524345c7 Last fixes to restore web functionality 2023-03-02 10:57:44 +11:00
Johnathan Sharratt
e81a037b32 Fixed a bug on the process join callback and the globals 2023-03-02 10:19:04 +11:00
Johnathan Sharratt
fa41ae375d Restored the uses package dependencies 2023-03-02 07:59:30 +11:00
Johnathan Sharratt
a72605a2fe Fixed an issue where tokio time was being used inside JS runtimes which is not supported 2023-03-02 07:48:55 +11:00
Johnathan Sharratt
5fa6f90b44 Fixed an issue where the globals were not being properly captured and restored for JS 2023-03-02 07:33:02 +11:00
Syrus Akbary
b8ecd90795 Fixed missing memory export in WASI as the API got simplified 2023-03-01 14:58:40 -08:00
Syrus Akbary
4629a32d59 Use js-generic instead of generic for the js engine 2023-03-01 11:49:39 -08:00
Syrus Akbary
4973be5ee2 Refactored common WasmTypeList implementations 2023-03-01 11:47:18 -08:00
Maxime
51b22145d4 Remove unused import in lib.rs example
`FunctionEnv` isn't used in the demo code.
2023-03-01 13:44:13 +01:00
Johnathan Sharratt
d2c381e750 The VMMemory must be convertable into a JsValue 2023-03-01 17:30:00 +11:00
Johnathan Sharratt
a82ea3c1e7 Added some fixes for the browser version to work again 2023-03-01 16:51:53 +11:00
Syrus Akbary
770bb404b1 Fixed missing memory export in WASI as the API got simplified 2023-02-28 15:59:55 -08:00
Syrus Akbary
fc64202104 Use AtomicUsize instead of AtomicU64 2023-02-28 09:24:29 -08:00
Syrus Akbary
4fb02b87dd Update lib/api/src/engine.rs 2023-02-28 09:17:27 -08:00
Syrus Akbary
d5c7b8ac18 Update lib/api/src/engine.rs 2023-02-28 09:17:18 -08:00
Syrus Akbary
b47cc839cd Removed unsafe js intos 2023-02-28 09:13:28 -08:00
Christoph Herzog
830f1bd49b registry: Move queries from RegistryClient methods functions in api module 2023-02-28 16:42:35 +00:00
Christoph Herzog
d6a94d6086 feat(registry): Add Deploy App Publishing and Token Generation
Adds two new GraphQL mutations for publishing a Deploy app and for
creating a Deploy token for an app version.

Also extends the RegistryClient with functions to execute these
mutations.
2023-02-28 16:42:35 +00:00
Christoph Herzog
55ededd397 registry: Add a RegistryClient abstraction
Adds a more coherent abstraction for running queries against the
registry in a RegistryClient struct.
2023-02-28 16:42:35 +00:00
Christoph Herzog
04fc85ba33 chore(registry): Format GraphQL files with prettier 2023-02-28 16:42:35 +00:00
Christoph Herzog
b4b8d8be9f docs(registry): Add minimal README for the registry
Also contains instructions for updating the schema and formatting
GraphQL files.
2023-02-28 16:42:35 +00:00
Christoph Herzog
ba4990d71f refactor(registry): Clean up the graphql code structure
* Remove duplicated GraphQL query/mutation definitions
* Move all queries to a submodule
* Move all mutations to a submodule
* Move inline proxy module to a submodule
2023-02-28 16:42:35 +00:00
Syrus Akbary
a0e11bf1de Fixed linting 2023-02-28 00:37:42 -08:00
Syrus Akbary
bef5f9e2e6 Merge branch 'master' into std-api 2023-02-28 00:33:37 -08:00
Syrus Akbary
c04e536701 Fix code 2023-02-28 00:33:28 -08:00
ptitSeb
2a4b9a7be1 Fix linter 2023-02-28 09:17:28 +01:00
Syrus Akbary
e26a78408c Remove unused code 2023-02-27 23:32:19 -08:00
Syrus Akbary
09427c3bb6 Make automatically the trait Into<Engine> conversions 2023-02-27 23:25:17 -08:00
Syrus Akbary
fe72a5ab7f Merge branch 'master' into std-api
# Conflicts:
#	lib/api/src/js/function_env.rs
#	lib/wasi/src/bin_factory/exec.rs
2023-02-27 23:06:25 -08:00
Syrus Akbary
bb6904647c Merge pull request #3612 from wasmerio/feat_data_and_store_mut
Added conveniance function FunctionEnvMut::data_and_store_mut
2023-02-27 22:17:24 -08:00
kotborealis
f1cbdf34e2 Merge branch 'master' into master 2023-02-28 09:08:35 +03:00
Sven Sauleau
ed0951fbce add basic coredump generation
This change adds a basic coredump generation after a WebAssembly trap
was entered. The coredump includes rudimentary stack / process debugging
information.

A new CLI argument is added to enable coredump generation:

```
wasmer --coredump-on-trap=/path/to/coredump/file module.wasm
```

See docs/en/examples-coredump.md.

Refs https://github.com/wasmerio/wasmer/issues/3578
2023-02-27 21:12:28 +00:00
Johnathan Sharratt
85c7433751 Added some debug information for packages that are fetched 2023-02-27 13:33:03 +00:00
Johnathan Sharratt
05ed3cfb40 Removed some trace info which is bloating the logs
Removed some trace info which is bloating the logs
2023-02-27 13:33:03 +00:00
Johnathan Sharratt
1e97b363f6 Fixed an issue where packages without commands were not loading the webc file system because it was package specific, for webc inheritence this does not make sense 2023-02-27 13:33:03 +00:00
ptitSeb
1405d7ff99 Merge branch 'master' into feat_data_and_store_mut 2023-02-27 11:18:11 +01:00
ptitSeb
ec14a758ac Fixed linting 2023-02-27 10:19:58 +01:00
Christoph Herzog
87a4961955 deps(wasi): Always enable rt feature in tokio
Because it is required.
2023-02-27 08:32:49 +00:00
Johnathan Sharratt
f914485da6 Fixed multi-threading bugs
There was a thread corruption issue causes when real threads spawned a thread
multiple times. This occured because the thread context was being reused
from previously exited threads.

Also there was a bug in the futex_wait callback where it was not correctly
returning the woken event
2023-02-27 08:32:49 +00:00
Christoph Herzog
bc2a2dd4c2 wasi: Remove vbus leftovers and improve task joining
* A new TaskStatus is introduced that specifies the current state of a task
  (usually a process or thread)
* Status tracking is refactored to use tokio::sync::watch instead of a
  homegrown solution which combined channels and mutexes
* The task status now not just tracks an exit code, but also the ocurred error
  This helps consumers of the task status to know that and error
  ocurred, and which one, which helps debugging / logging and potential
  recovery
* Remove the unused VBUS crate leftover types and traits
  Almost all gone, except for the VirtualBusError
* Move SignalHandlerAbi types to os::signal
2023-02-26 23:26:23 +00:00
Syrus Akbary
93def03796 Address most of the comments 2023-02-25 11:23:03 -08:00
kotborealis
1b4a2c3f5c Merge branch 'master' into master 2023-02-25 15:06:15 +03:00
Syrus Akbary
5bdf3d4e2b Fixed unimplemented 2023-02-24 15:02:25 -08:00
Syrus Akbary
a6ebf78fcb Verious fixes for the wasix merge 2023-02-24 14:37:48 -08:00
Syrus Akbary
826d32194d Merge branch 'master' into std-api
# Conflicts:
#	lib/api/src/js/mem_access.rs
#	lib/api/src/js/mod.rs
#	lib/api/src/sys/typed_function.rs
#	lib/wasi/src/syscalls/wasix32.rs
#	lib/wasi/src/syscalls/wasix64.rs
#	lib/wasi/src/utils/mod.rs
2023-02-24 14:13:02 -08:00
Syrus Akbary
9ed86ad6db Make cli compilable again 2023-02-24 13:51:37 -08:00
Syrus Akbary
1f64ba13e0 Wrap engine 2023-02-24 13:35:46 -08:00