Commit Graph

185 Commits

Author SHA1 Message Date
ptitSeb
d08d3c1c95 Updated the other crates too 2023-04-18 16:53:04 +02:00
ptitSeb
7fb7c09080 Release 3.2.0 2023-04-18 16:30:03 +02:00
ptitSeb
e40c6a4177 Release 3.2.0-beta.2 2023-04-05 13:25:40 +02:00
ptitSeb
c145390caa Bumped crates version pre-beta.2 release (#3743) 2023-04-05 10:45:13 +00:00
Syrus Akbary
1031b9b1b5 Merge branch 'master' into master-with-fixes
# Conflicts:
#	lib/c-api/Cargo.toml
#	lib/cache/Cargo.toml
#	lib/cli/Cargo.toml
#	lib/emscripten/Cargo.toml
#	lib/wasi/Cargo.toml
2023-03-26 19:55:33 -07:00
ptitSeb
c9743a03f1 Fixes post 3.2.0-beta.1 release (but needed for the crates publication) (#3705) 2023-03-23 20:26:50 +01:00
ptitSeb
d58d158897 Release 3.2.0-beta.1 2023-03-22 19:14:57 +01:00
Syrus Akbary
499777fc15 Merge branch 'master-with-fixes' into shared-dash-fixes-and-pthreads
# Conflicts:
#	lib/wasi/Cargo.toml
#	lib/wasi/src/runtime/mod.rs
#	lib/wasi/src/runtime/task_manager/mod.rs
#	lib/wasi/src/runtime/task_manager/tokio.rs
#	lib/wasi/src/syscalls/wasix/proc_fork.rs
#	lib/wasi/src/syscalls/wasix/thread_spawn.rs
2023-03-16 16:27:27 -07:00
Syrus Akbary
72c9d7394f Fixed sys/js misused features in wasmer 2023-03-16 14:25:42 -07:00
Johnathan Sharratt
e2bf8deabc Merge branch 'master' into dash-fixes-and-pthreads 2023-03-17 04:23:38 +11:00
ptitSeb
feb79e4392 Renamed some crates and changed their version to 0.1.0 2023-03-15 14:20:04 +01:00
Johnathan Sharratt
7e0055b6dc Clippy fixes 2023-03-11 14:40:55 +11:00
Johnathan Sharratt
a41bf19da0 Refactored the exit codes so they can be strongly typed and arbitary 2023-03-11 12:50:56 +11:00
Johnathan Sharratt
80b10fcba7 Updates for the review comments 2023-03-09 16:11:42 +11:00
Johnathan Sharratt
1c85b34031 Removed tracing dependency that should not have been added 2023-03-09 15:55:16 +11:00
Johnathan Sharratt
6dde2831a0 Improvements to the tracing and logging in wasmer
- Now using the fmt subscriber for improved formatting
- Using spans on all syscalls
- Added recorded fields on the spans instead trace and debug macros
- Adding timing on all syscall
2023-03-07 11:15:15 +00:00
Johnathan Sharratt
ea76a73fa7 Merge remote-tracking branch 'origin' into dash-fixes 2023-03-07 15:56:43 +11:00
Johnathan Sharratt
65eed0dbff Implemented the threads spec (pthreads) for WASIX 2023-03-07 04:09:23 +11:00
Johnathan Sharratt
5c2f00119f Added the new thread start routines 2023-03-07 00:19:16 +11:00
Johnathan Sharratt
010e7a2e99 Added the missing join flags to proc_join 2023-03-04 05:31:18 +11:00
Johnathan Sharratt
1eba7cffb0 Fixed the proc_join syscall 2023-03-04 04:41:47 +11:00
Johnathan Sharratt
e39c438dfa Staging changes ready for WASIX syscall changes 2023-03-04 03:37:36 +11:00
Johnathan Sharratt
dd8c902e4c Fixed the signals and error codes 2023-03-03 23:33:06 +11: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
Christoph Herzog
cbcae65d71 Merge remote-tracking branch 'origin/wasix-major-fixes-and-tweaks' into wasix 2023-02-16 06:11:48 +01:00
Christoph Herzog
506da0bdd7 chore: Remove all WASIX bus and event related syscalls + types
The implementations were previously already replaced with stub impls.
After ensuring that the current wasix modules don't actually import the
syscalls, we can now safely remove all the plumbing, including:

* syscalls
* types
2023-02-15 15:55:56 +01:00
Johnathan Sharratt
cc83041680 Merge branch 'wasix' of github.com:wasmerio/wasmer into wasix-major-fixes-and-tweaks 2023-02-15 17:07:17 +11:00
Johnathan Sharratt
c12a60f9a7 Many bug fixes and performance optimizations
- Removed generation_arena which was causing some serious leakages of files and sockets
- Added OsError for NetworkErrors so that "Too Many Open Files" is properly passed
- Local networking will now cap at 10 sockets in the backlog
- Added the missing shutdown error code
- Removed the inodes lock around most of the WASI syscalls
- Fixed some race conditions in the event notifications for WASI
- The polling loop will now only notify a closed socket once
- Event notifications now uses Wakers rather than MPSC
- Some socket errors now return the right codes which prevents panics in WASM
- Fixed a bug where the file read and write guards might release the file before the lock
- The inode seed is now much safer preventing overlaps
- The fd seed is now much safer preventing overlaps
- Closing files is now implicit rather than explicit reducing possibliities for error
- Forking of file descriptors is now much simplier
- Polling events will now be returned in random order to prevent some race conditions
- Removed a number of memory allocations which were wasting memory and performance
- Sockets now only copy the send and recv data once rather than multiple times
2023-02-15 16:13:48 +11:00
Christoph Herzog
6b9130b165 tests: Temporarily disable WAI bindings generator test 2023-02-10 18:37:50 +01:00
Christoph Herzog
d1bae195b3 Merge remote-tracking branch 'origin/master' into wasix 2023-01-23 22:00:16 +01:00
Felix Schütt
4b9389cdaa Release 3.2.0-alpha.1 2023-01-23 12:52:43 +01:00
Christoph Herzog
374e8b0513 chore: Remove unused import 2023-01-17 18:19:33 +01:00
Christoph Herzog
07b428d56d codegen: Re-run wasi types generator 2023-01-17 18:18:19 +01:00
Christoph Herzog
8ce631a5c0 Wasi bindings generator: derive Hash for Signal,Snapshot0Clockid
Because the manual implementation causes clippy warnings
2023-01-17 18:17:34 +01:00
Christoph Herzog
8ca8db8134 Merge remote-tracking branch 'origin/master' into wasix 2023-01-13 09:48:40 +01:00
Syrus Akbary
85f8212e00 Fix wasmer-wasi-js compilation 2023-01-10 11:50:38 +00:00
Christoph Herzog
886811b30a chore: Fix unused import warning
Must ignore it since it's auto-generated code.
2022-12-15 10:39:09 +01:00
Christoph Herzog
173e48601c Merge remote-tracking branch 'origin/master' into wasix 2022-12-13 01:40:22 +01:00
Felix Schütt
d45850733e Release 3.1.0 2022-12-12 13:38:00 +01:00
Christoph Herzog
9bc2ea9c8a Refactor wasix http bindings
* Move wasmer bindings from wasi-types to wasi crate
  It makes much more sense to only have the host bindings in the wasi crate.
  Otherwise it comlicates feature gating for JS.
* Change module initialization to only initialize wasix_http bindings if
  the module requires them.
* Patch up bindings to return a Box<dyn FnOnce> initializer.
2022-12-11 19:50:44 +01:00
Christoph Herzog
fa7ac64398 wasi-types: Add wasix http bindings
Initial step towards implementing wasix http client support for Wasm
instances using WAI generated bindings.

Adds a "wasix_http_client_v1.wai" schema for http clients.

Extends the wasi-types type generator to also generate Wasmer host
bindings for the wasix_http_client_v1 bindings.
These are written to wasi-types/src/wasix.
Some custom fixup of the bindings is needed.

Also adds a patch to Cargo.toml that forces wai-bindgen-wasmer to use
the repo-local wasmer crate.

Also adds generation of Rust client bindings.
2022-12-11 05:55:07 +01:00
Christoph Herzog
7c69d6517a Re-generate wasi-types bindings
The last commit refactored the bindings generation code.
This commit now actually contains re-generated bindings built with the new
generator.
2022-12-09 20:14:33 +01:00
Christoph Herzog
3b27b50880 build: Refactor wasi-types regenerate.sh to Rust
Replace the lib/wasi-types/regenerate.sh shell script with a Rust
implementation.

We already had some Rust fixup code in lib/wasi-types/wasi-types-generator-extra.

This mostly just converts the "wai-bindgen" CLI invokation into Rust
code that uses the wai-bindgen crates as a dependency.

Also moves the .wit files from "wit-clean" to ./schema/wasi and uses the
.wai extension.

The ./schema dir will also hold Wasix-specific definitions in the future.
2022-12-09 20:14:32 +01:00
Christoph Herzog
51a4126d27 build: Don't enable wai-bindgen-rust async feature
wai-bindgen-rust has an async feature, which is enabled by default and
breaks wasm32-unknown builds.

Disables default features.
2022-12-08 15:10:21 +01:00
Christoph Herzog
d55b1f0bb2 wasi: Re-generate binding types 2022-12-08 15:03:27 +01:00
Michael-F-Bryan
19a89f9005 Switch from wasmer-bindgen to wai-bindgen 2022-12-08 14:14:54 +01:00
Christoph Herzog
24e550cb13 fix: Calculate required struct padding for busevent
The padding can't / shouldn't be hardcoded, because of differing
alignments between architectures.

Instead we calculate it at compile time.
2022-12-08 13:55:15 +01:00
Christoph Herzog
a9739f2674 Backport: Support all WASI clock types
Backports commit 075b77fd7b, which fixes
2022-12-06 15:09:53 +01:00
Christoph Herzog
eb60a96bcf Merge branch 'master' into wasix-merge 2022-12-06 13:22:09 +01:00
Christoph Herzog
075b77fd7b fix: Fix busevent struct size on ARM
ARM has different alignment requirements, making the struct larger.
This might not actually work properly, because the struct inside the Wasm
instance will probably have the wrong size.
Need to fix this by doing better de/serialization, or by removing the u128
from the data!
2022-12-06 00:29:17 +01:00