Commit Graph

72 Commits

Author SHA1 Message Date
Michael-F-Bryan
63333037cf Update the runner trait to accept a webc::Container 2023-04-13 23:44:22 +08:00
Michael-F-Bryan
60d1b0cf63 Made clippy happy 2023-03-24 22:08:02 +08:00
Michael-F-Bryan
7b49f56552 The wat2wasm runner test needs an argument 2023-03-22 01:39:08 +08:00
Christoph Herzog
4a99b50af8 Remove PluggableRuntime::default()
We don't want this impl anymore, because the user should be forced to
supply the virtual task manager manually so they are cognizent of the
fact they WASIX is running on an async runtime.
2023-03-21 17:20:27 +00:00
Christoph Herzog
ffacc03ded refactor(wasi): Rename PluggableRuntimeImplementation to PluggableRuntime
The *Implementation suffix is just pure noise.
2023-03-21 17:20:27 +00:00
Johnathan Sharratt
e2bf8deabc Merge branch 'master' into dash-fixes-and-pthreads 2023-03-17 04:23:38 +11:00
ptitSeb
f59ab5caee Renamed virtfs to virtual-fs and virtnet to virtual-net 2023-03-16 09:29:51 +01:00
Johnathan Sharratt
8312c2e364 Fixes for snapshot tests
-- Fixed some linting issues on the "--" argument fix of the wasmer command
- Fixed the unit tests for dash and bash subprocesses
- Fixed the order of the flushing of files so that processes are notified of exit only after the open file handles are flushed
- Added a step that explictily flushes the stdout and stderr on cleanup of an exited process
2023-03-16 13:10:00 +11:00
ptitSeb
feb79e4392 Renamed some crates and changed their version to 0.1.0 2023-03-15 14:20:04 +01:00
Michael-F-Bryan
20c10bcaf6 Updated the Python WASI runner test to check for a specific exit code 2023-03-06 22:52:17 +08:00
Michael-F-Bryan
a9a091d85f Add an integration test for running the Python container 2023-03-06 22:52:16 +08:00
Michael-F-Bryan
c2dab64686 Added "can_run" tests 2023-03-06 22:51:36 +08:00
Michael-F-Bryan
3af48f7028 Hoisted shared state into its own struct 2023-03-06 22:45:51 +08:00
Michael-F-Bryan
cb0cea4653 Got the WASI and WCGI tests passing 2023-03-06 22:40:08 +08:00
Michael-F-Bryan
d09b6a512d Fleshed out the WCGI runner integration test 2023-03-06 22:34:17 +08:00
Michael-F-Bryan
91a8d4c598 Wrote integration tests for the WASI and WCGI runners 2023-03-06 22:34:17 +08: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
a328f32478 Remove Pipe::default()
Pipe::new() was previously also removed.
Use Pipe::channel() instead
2023-02-20 14:50:52 +01:00
Christoph Herzog
244c5f66e6 fix: make Pipe::new() private and replace usage
Pipe::new() easily leads to dangling pipes due to lack of close on drop
of the sender.
2023-02-20 14:18:35 +01:00
Christoph Herzog
60850bdb2f fix(wasi): Get the JS implementation to build (somewhat hackily)
Makes various fixes to get wasi JS to build.

Has some nasty workarounds that need to be removed in the future.
2023-02-14 13:24:45 +01:00
Christoph Herzog
2cfe241c6a refactor: Rename WasiPipe to Pipe and WasiBidirectionalPipePair to BidiPipe
The vfs is not directly tied to WASI, so naming it after wasi makes no
sense.
2023-02-10 20:22:51 +01:00
Christoph Herzog
613cd1fef9 tests: Fix some tests
Needed updates for wasix refactoring.
2023-02-10 18:17:04 +01:00
Christoph Herzog
0a96ec88a1 tests: Remove a test that has been moved to snapshot tests 2023-02-10 18:17:04 +01:00
Christoph Herzog
9f600bfeaf tests(wasi): Remove some manual tests that are covered by snapshot tests
Found in the CLI integration test suite
2023-02-10 11:45:29 +01:00
Christoph Herzog
6be6561ef3 chore: Fix clippy lints 2023-02-09 14:58:47 +01:00
Christoph Herzog
fe75ef053f tests: Fix up name changes in a few tests 2023-02-08 17:23:43 +01:00
Christoph Herzog
bd58c08db5 tests: Update some tests to new WasiEnv construction 2023-02-08 16:38:53 +01:00
Christoph Herzog
43653bc9bb tests: Move fd_mmap_memory test to sys-utils crate
fd_mmap_memory was moved there previously
2023-01-25 17:31:19 +01:00
Christoph Herzog
a9e972c83c tests: Add a commented out test for fd_mmap memory
Adds a test for the custom memory computation that is currently
commented out.

Mostly here for testing purposes, should be removed again.
2023-01-23 19:13:34 +01:00
Michael-F-Bryan
576074914a Renamed all WasiState::new() calls 2023-01-16 15:43:16 +00:00
Christoph Herzog
1e01f8791a wasi: Implement wasix http client support
Implements support for wasix_http_client_v1 using wai generated bindings.

Uses the generated bindings to provide the relevant syscalls to Wasi
guest modules.

Also adds http capability settings to WasiEnv, which control the http
permissions for an instance.

Due to WAI bindings needing to run initialization functions on the
instance, this also refactors instance creation.
The import_object_for_all_wasi_versions() method is now private.
A new build_wasi_instance() is to be used instead.
2022-12-11 05:58:56 +01:00
Christoph Herzog
48fd1c32f2 test: Fix some test warnings 2022-12-06 21:27:09 +01:00
Christoph Herzog
eb60a96bcf Merge branch 'master' into wasix-merge 2022-12-06 13:22:09 +01:00
Christoph Herzog
19458e804f fix: Fix various wasi tests - SORT OF
Skips some tests, probably changes some tests so they fail...

But this gets us compiling again.
2022-12-06 00:58:46 +01:00
Christoph Herzog
32713592a6 Fix some async tests
Were missing "async" before fn.
2022-12-03 12:24:30 +01:00
Johnathan Sharratt
90c5a04619 Further propogation of WasiErrors from asynify calls 2022-11-27 18:47:33 +11:00
John Sharratt's Shared Account
e64eedde08 Moved the tests readme file to the right location in the directory tree 2022-11-22 12:28:39 +11:00
John Sharratt's Shared Account
0b4affaa91 - Fixed an issue where the WebC caching was active for JS
- Fixed an issue with tokio missing io-util on JS builds
- Fixed an issue where duplicate stdio file descriptors was not preserving the is_stdio flag
- Added a text file that describes a suite of integration tests for WASIX
- Added compiled WASIX programs used for testing purposes
2022-11-22 12:26:37 +11:00
Syrus Akbary
0a1a71fd6e Revert #3145
This reverst buggy commit e1e08f44b7
2022-11-21 11:09:19 -08:00
Christoph Herzog
61190088d2 Partial rebase to wasmer master (non-functional) 2022-11-07 15:15:25 +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
67d650146c cargo clippy --fix 2022-10-14 13:00:55 +02:00
Felix Schütt
0e5b55f845 Set blocking = false for all tests 2022-09-19 14:19:16 +02:00
Felix Schütt
8aa69d2b63 Try fixing failing JS tests 2022-09-19 14:17:10 +02:00
Felix Schütt
72acbc8f93 cargo fmt 2022-09-19 12:28:27 +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
6b6785ba69 Fix "make lint" 2022-09-09 13:51:20 +02:00