ptitSeb
f59ab5caee
Renamed virtfs to virtual-fs and virtnet to virtual-net
2023-03-16 09:29:51 +01:00
Johnathan Sharratt
0b8d2b1248
Added more tests for the dev files and added urandom support
2023-03-16 16:46:59 +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
4ef63b22de
Switch wasmer_vfs::host_fs tests over to using tempdir
2023-03-13 22:38:39 +08:00
Michael-F-Bryan
114eeb357e
We lost wasmer-vfs's dependency on indexmap during a rebase
2023-03-06 23:16:13 +08:00
Michael-F-Bryan
7ea729148f
Reverted accidental Cargo.toml formatting
2023-03-06 22:56:14 +08:00
Michael-F-Bryan
0d88c8faa2
Made "make lint" happy
2023-03-06 22:45:51 +08:00
Michael-F-Bryan
649c808afe
Miscellaneous refactoring and tidy-ups
2023-03-06 22:42:55 +08:00
Michael-F-Bryan
7303fabf35
Started adding a WcgiRunner implementation to the wasmer-wasi crate
2023-03-06 22:34:15 +08:00
Michael-F-Bryan
7d409f8b07
Upgraded everything to use webc v5
2023-03-06 22:30:51 +08: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
Christoph Herzog
df6434fcac
Ensure WasiEnv cleanup in CLI
2023-02-23 10:45:10 +01:00
Christoph Herzog
16e92ff680
Rename SpecialFile to DeviceFile
...
Because some people don't like anything special in their code base...
2023-02-22 23:19:01 +01:00
Christoph Herzog
7ed3288443
chore: Formatting
2023-02-22 19:15:48 +01: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
c319a84dad
chore: Fix clippy lints
2023-02-20 11:30:33 +01:00
Christoph Herzog
5799efce0c
refactor: Rename DuelWriteFile to DualWriteFile
...
Just fixing a typo...
2023-02-20 09:40:25 +01:00
Johnathan Sharratt
5b54b81539
Removed some old debug message that came from somewhere
2023-02-20 16:12:50 +11:00
Johnathan Sharratt
439dd4fe7f
Added some more file implementations that support the Console
2023-02-20 15:27:53 +11:00
Johnathan Sharratt
9a5dd9fe46
Added a standard file that allows for writes to be intercepted - used by the runtime debugging in Deploy
2023-02-20 14:43:13 +11:00
Johnathan Sharratt
017592de6e
Added some methods to convert pipes into split components
2023-02-20 13:55:54 +11:00
Johnathan Sharratt
6a087bd338
Added a channel method to the pipes
2023-02-20 13:52:23 +11:00
Johnathan Sharratt
c010866714
Refactored the console so it accepts multiple pipes for STDIO
2023-02-20 13:50:09 +11:00
Johnathan Sharratt
61ab2105cf
Pipe can now be split and combined
2023-02-20 10:22:40 +11:00
Christoph Herzog
8074253fe2
VFS cleanuup: remove redundant dependencies and feature flags
...
* Remove all dependencies to Wasmer crates (previously used for really
trivial type definitions)
* Remove feature flags that make no sense anymore:
- js/sys from wasmer
- std/core - nostd support was intended at some point, but isn't implement
2023-02-16 20:58:32 +01:00
Christoph Herzog
195ea89841
wasi: Rename BidiPipe to DuplexPipe and add helper methods
...
* Rename BidiPipe to DuplexPipe, because the name is better
* Make the fields private: gives us more flexibility in the future
* Add a split() method and accessors for send and receive
2023-02-16 20:14:59 +01:00
Christoph Herzog
3e43325f0d
wasi: Remove WasiPipe::channel to prevent misuse
...
The WasiPipe::channel() function is a leftover from a previous
implementation.
It pipes data through two different Pipes, which doesn't actually make
any sense in most circumstances.
Best to remove the function.
Users should just use Pipe::new(), or DuplexPipe::new().
2023-02-16 20:13:43 +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
825628f257
fix: Do not purge reader when closing a WasiPipe
...
Only tearing down the writer is enough.
The previous implementaiton would prevent users from reading the
remaining content in a pipe after closure.
2023-02-10 18:17:04 +01:00
Christoph Herzog
cca51c0463
wasi: Replace custom VirtualFile::write with tokio::AsyncWrite::shutdown
...
No need to duplicate the functionality...
2023-02-10 17:47:27 +01:00
Christoph Herzog
70d880ef85
chore: Fix clippy lints
2023-02-10 17:16:23 +01:00
ptitSeb
b1a080d85e
union_fs rename also needs some Windows backslash to slash transformations
2023-02-10 16:58:12 +01:00
Christoph Herzog
f88d3681e3
wasi: Add VirtualFile::close and close all fds on WasiFs cleanup
...
* Adds a new VirtualFile::poll_close method for closing a file.
* Adds a VirtualFileClose future and a VirtualFileExt::close() method
for more convenient async closing
* Updates WasiFs to call close() for all fds on cleanup
NOTE: this is a WIP implementation of closing, the only VirtualFile
implementor that was updated is WasiPipe.
2023-02-10 15:58:53 +01:00
ptitSeb
68f0f6dd18
Host_fs doesn't have created timestamp on musl it seems (at least on gh CI)
2023-02-10 15:55:53 +01:00
ptitSeb
ba7cb88a1d
Fixed union_fs tests on Windows
2023-02-10 15:07:09 +01:00
ptitSeb
27cb987ab1
Fixed host_fs tests on Windows platforms
2023-02-09 18:03:43 +01:00
Christoph Herzog
4f9eab57a0
chore: Fix more clippy lints
2023-02-09 15:05:47 +01:00
Christoph Herzog
8f97dabcea
wasi: Add WasiPipe::new() constructor
...
A single pipe is sufficient for many contexts, no need to use WasiBidirectionalPipePair
everywhere.
2023-02-09 08:58:56 +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
Christoph Herzog
5c358e6dc5
tests: Fix incorrect test assertion for fs metadata
...
The accessed time can/will change after a rename, which is correct
behaviour.
This wasn't accounted for in the test.
2023-02-02 23:44:04 +01:00
Christoph Herzog
f40c2f8fc9
Virtual Host FS: Sort readdir() result by path
...
Was previously sorted by modification time, which is not terribly
deterministic and problematic to sort on in tests.
2023-02-02 23:35:46 +01:00
Christoph Herzog
1406c37be7
Change buf size hint to a const and add documentation
...
Define a const for the poll_write_ready buffer size hint, and add some
explanation about the chosen number.
2023-02-02 22:24:16 +01:00
Christoph Herzog
b05d77d463
chore: Fix a whole bunch of clippy lints
...
Mostly just cosmetic stuff.
On non-trivial change: changed WasiPipe to have a wrapper subtype for
the reader, which includes the channel and the buffer.
2023-01-30 14:15:58 +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
Felix Schütt
1042053b6e
Revert "Fix make lint"
...
This reverts commit 912f21ab03 .
2023-01-19 09:22:45 +01:00
Felix Schütt
912f21ab03
Fix make lint
2023-01-17 21:23:07 +01:00
Felix Schütt
1cb29bbfa1
Fix feature flags for make-build-wasmer-headless
2023-01-17 10:31:07 +01:00
Christoph Herzog
a6fa558e8a
Merge branch 'wasix-core-changes' into wasix
2022-12-27 15:08:37 +01:00