Commit Graph

57 Commits

Author SHA1 Message Date
ptitSeb
d6981ae3a9 Moved vnet-host functions inside virtual-net 2023-03-16 10:56:51 +01:00
ptitSeb
f59ab5caee Renamed virtfs to virtual-fs and virtnet to virtual-net 2023-03-16 09:29:51 +01:00
ptitSeb
feb79e4392 Renamed some crates and changed their version to 0.1.0 2023-03-15 14:20:04 +01:00
Christoph Herzog
6d4a41abf0 deps: Remove unused dependency from vnet
Probably some copy-pasta leftover.
2023-02-16 21:29:37 +01:00
Christoph Herzog
76a2996751 Remove libc dependency from vnet again
libc was added as a dependency to vnet for error mapping.

This breaks JS targets.

Removed the dependency, and removed the mapping functions.
Will be added again in the wasi crate.
2023-02-16 13:38:04 +01:00
Christoph Herzog
a7cd600382 chore: Fix clippy lints 2023-02-16 07:40:48 +01:00
Christoph Herzog
cbcae65d71 Merge remote-tracking branch 'origin/wasix-major-fixes-and-tweaks' into wasix 2023-02-16 06:11:48 +01:00
Johnathan Sharratt
4473be1b04 Replaced OsError with concrete types 2023-02-16 10:46:18 +11:00
Christoph Herzog
e385a017ec build: Remove useless host-fs feature from vnet crate
It's not used and doesn't make sense.
Probably an artifact of copying the vfs crate...
2023-02-15 11:28:33 +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
4f9eab57a0 chore: Fix more clippy lints 2023-02-09 15:05:47 +01:00
Johnathan Sharratt
26d4a6a0de Many performance and memory optimizations
- Avoiding a memory copy on all socket reads and writes using a new `copy_from_slice` instead
- File openers no longer box the implementation avoiding a memory allocation on all file access
- Polling sockets rather than using an async function which significantly reduces locking contention and removes an box operation
- Futex now uses wakers rather than broadcasts which makes them more efficient and durable
- Converted many async functions into sync functions in vnet
- Sleeping no longer allocates memory
- Avoiding a number of WasiEnv clones which was impacting performance and memory efficiency
2023-02-07 11:40:49 +01:00
Johnathan Sharratt
9bc44d49a2 Many performance and memory optimizations
- Avoiding a memory copy on all socket reads and writes using a new `copy_from_slice` instead
- File openers no longer box the implementation avoiding a memory allocation on all file access
- Polling sockets rather than using an async function which significantly reduces locking contention and removes an box operation
- Futex now uses wakers rather than broadcasts which makes them more efficient and durable
- Converted many async functions into sync functions in vnet
- Sleeping no longer allocates memory
- Avoiding a number of WasiEnv clones which was impacting performance and memory efficiency
2023-02-05 10:16:41 +11:00
Christoph Herzog
62026e4bee wasix: Remove websocket support
Removes the websocket support from wasix.

Websockets are a high level concept.
They should not be integrated so deeply into the core of wasix.

For client connections, we will want to add support for websocket
clients into the custom wasix_http_client bindings.

For servers, the support should go into the custom wcgi server bindings.
2023-02-03 15:31:55 +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
Johnathan Sharratt
1a0a1e5a93 Removed peek_from which is not needed anymore and adds complexity 2023-01-19 11:26:28 +11:00
Johnathan Sharratt
67a1a89f8c Fix for the read ready event on local networking which was missing events on new connections in certain race conditions 2023-01-19 11:08:31 +11:00
Johnathan Sharratt
30ec91d489 Fixed for a futex race conditon and infinite polling 2023-01-19 01:02:51 +11:00
Johnathan Sharratt
10b4d44b48 cargo fmt 2023-01-15 10:54:00 +11:00
Johnathan Sharratt
3ebf3bec7d Fixed a major bug where the polling loop with a zero time was returning an event when it should not have been, causing an infiinte loop 2023-01-15 10:53:47 +11:00
Johnathan Sharratt
0feb0a5859 Fixed a blocking issue when an accept is issued at the same time as a polling loop 2023-01-13 10:11:07 +11:00
Johnathan Sharratt
703ef66b98 Fixed a bug where closed sockets would cause the polling loop to spin 2023-01-12 17:20:16 +11:00
Johnathan Sharratt
dfa40a33c5 Sockets now properly flush and close when they are gracefully closed by a wasi app 2023-01-02 20:31:13 +11: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
8426631028 Remove legacy wasix http request support
Removes the old wasix http request support from the vnet and wasi crates.
This was replaced by the recently introduces wasix_http_client_v1 bindings.

Motivation: http requests are a high level functionality, not a fundamental
networking concept.

They shouldn't be integrated this deeply into the networking stack.

Wasix modules can either bring their own http client that uses regular
sockets, or use the wasix http client bindings.

Additional upside is removal of quite a bit of http related code in the
networking stack.

Note: the same should probably be done for the WebSocket support in vnet.
2022-12-11 06:30:31 +01:00
Christoph Herzog
eb60a96bcf Merge branch 'master' into wasix-merge 2022-12-06 13:22:09 +01:00
Johnathan Sharratt
88ad56606c More async functions on the networking interface to support deploy 2022-11-30 23:57:14 +11:00
Johnathan Sharratt
aaa75f9459 The remaining network methods are now all aynchronous 2022-11-30 16:20:43 +11:00
Felix Schütt
b70f6e9052 Release 3.0.2 2022-11-25 21:30:20 +01:00
Felix Schütt
27f3300fef Release 3.0.1 2022-11-23 01:14:06 +01:00
Christoph Herzog
5a88aec48a refactor(wasi): Introduce DynVirtualNetworking type alias
Makes for cleaner code.
2022-11-20 17:30:39 +01:00
Felix Schütt
dcc0164698 Release 3.0.0 2022-11-20 17:00:03 +01:00
Felix Schütt
91c2c1daea Release 3.0.0-rc.4 2022-11-19 16:21:42 +01:00
Felix Schütt
820b83e56b Update 3.0.0-rc.2 -> 3.0.0-rc.3 2022-11-18 19:50:41 +01:00
John Sharratt's Shared Account
9627dc835e Resolved merge conflicts 2022-11-17 11:42:14 +11:00
Felix Schütt
dfd7ff41b5 Update wasmer-vfs implemenetation
* Add some new file systems
* Add tests
* General cleanup
2022-11-16 14:04:18 +01:00
Christoph Herzog
2b8a4e949e Formatting... 2022-11-16 12:47:01 +01:00
John Sharratt's Shared Account
c41af89e13 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-16 12:47:01 +01:00
Christoph Herzog
587571804e Formatting... 2022-11-07 15:11:42 +01: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
Felix Schütt
d2364f40bb Update versions via script 2022-11-02 14:52:12 +01:00
Felix Schütt
8ee578fb5d Update package versions 2022-10-25 12:54:45 +02:00
Felix Schütt
fef756412f Update 3.0.0-beta -> 3.0.0-beta.2 2022-09-26 12:20:35 +02:00
Syrus Akbary
f5996f1250 Use wasix conditionally 2022-08-30 12:32:22 -07:00
Manos Pitsidianakis
c570b1471a Bump version to 3.0.0-beta in Cargo manifests 2022-08-08 19:56:35 +03:00
Manos Pitsidianakis
430a7e2e19 Make serde optional everywhere with enable-serde feature flag 2022-08-02 15:45:28 +03:00
Felix Schütt
52a28a3902 Fix lib/vnet to compile, add wasmer-vnet 2022-07-30 11:31:10 +03:00