Commit Graph

9362 Commits

Author SHA1 Message Date
Syrus Akbary
fcad0fa5de Make AsJs work with unified Instance 2023-02-11 19:49:48 -08:00
Syrus Akbary
db6430c0b3 Unified Extern in js/sys 2023-02-11 19:32:01 -08:00
Syrus Akbary
1d85b301ef Moved reexports one level down 2023-02-11 18:35:03 -08:00
Syrus Akbary
92255601fe Merge branch 'master' into std-api
# Conflicts:
#	lib/api/src/sys/instance.rs
2023-02-11 18:19:10 -08:00
Syrus Akbary
f72220e9d7 Removed repeated comments 2023-02-11 18:10:22 -08:00
Syrus Akbary
3d56b6bdd6 Unify Instance in js/sys 2023-02-11 18:07:47 -08:00
Syrus Akbary
58f27ae045 Unify InstantiationError 2023-02-11 17:41:53 -08:00
Syrus Akbary
f8176e3bb6 Make js conversion uniform 2023-02-11 17:25:50 -08:00
Syrus Akbary
b9d21187ed Make instance more uniform 2023-02-10 18:53:18 -08:00
Syrus Akbary
4eaddb5ce4 Unify Imports in wasmer js/sys 2023-02-10 18:16:05 -08:00
Syrus Akbary
9f83b84e86 Moved js-specific functions to as_js module 2023-02-10 18:05:56 -08:00
Syrus Akbary
6c6f070c8d Remove unnecessary compiler flags in wasmer crate 2023-02-10 17:19:31 -08:00
Syrus Akbary
7d9ed6b67a Unified typed_function in js/sys 2023-02-10 17:11:23 -08:00
Syrus Akbary
6ede6a1999 Unified api for native in js/sys 2023-02-10 16:50:09 -08:00
Syrus Akbary
1e405d3e22 Unified exports in js/sys 2023-02-10 16:29:28 -08:00
Syrus Akbary
a5e631c176 Unified Value into js/sys 2023-02-10 16:20:47 -08:00
Syrus Akbary
c9e18e8d57 Fixed Context references 2023-02-10 16:06:47 -08:00
Syrus Akbary
c3576e1b3f Unified ptr::WasmPtr into js/sys 2023-02-10 16:03:43 -08:00
Syrus Akbary
a1d3891c1f Unify native_type::NativeWasmTypeInto in js/sys 2023-02-10 15:55:09 -08:00
Syrus Akbary
0dda3c1e65 Unified extern_ref in js/sys 2023-02-10 15:26:57 -08:00
Syrus Akbary
312aaf1e16 Use RawValue for wasmer js 2023-02-10 15:11:56 -08:00
Christoph Herzog
a33802e0d8 chore(wasi): Remove legacy pipe reepxort 2023-02-10 20:37:15 +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
0b6c07a5a7 wasi: Improve global tokio runtime detection in TokioTaskManager
Make sure to not create a new runtime if in an async context already.
2023-02-10 20:22:50 +01:00
Christoph Herzog
de419df9b4 fix(wasi): Revert making WasiEnv::cleanup async
It SHOULD be async, but doing that with the current WasiFs
implementation is a world of hurt and not feasible, since it leads to
all kinds of issues regarding async runtime behaviour.

For now we just manually invoke poll_shutdown a single time
2023-02-10 20:22:50 +01:00
Christoph Herzog
01b6e57d52 wasi: Fix cleanup from async context when spawning 2023-02-10 20:22:50 +01:00
Christoph Herzog
6b9130b165 tests: Temporarily disable WAI bindings generator test 2023-02-10 18:37:50 +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
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
Syrus Akbary
59a6b197fc Fix linting 2023-02-10 08:26:14 -08:00
Syrus Akbary
293834c793 Fix pending test 2023-02-10 08:21:55 -08:00
Christoph Herzog
70d880ef85 chore: Fix clippy lints 2023-02-10 17:16:23 +01:00
Syrus Akbary
543e7cb945 Make CI happy. Fix linting and imports 2023-02-10 08:05:07 -08: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
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
02245ce1f0 chore: Fix clippy lints 2023-02-10 11:37:36 +01:00
Christoph Herzog
15fdd65528 fix: Fix import paths in wasi-experimental-io-devices 2023-02-10 11:27:52 +01:00
Christoph Herzog
12a7de9331 wasi: Fix some clippy issues, add #[allow] for others 2023-02-10 11:18:33 +01:00
Christoph Herzog
7f78799110 chore: Fix some clippy lints 2023-02-10 10:47:24 +01:00
Christoph Herzog
6b6ae4d146 fix: Gate the fd_memory module to Linux targets
This memory implementation only works on Linux.
2023-02-10 10:34:47 +01:00
Syrus Akbary
5a829bc363 Unify mem_access api for js/sys 2023-02-09 17:59:30 -08:00
Syrus Akbary
039098ce2c Prepare mem_access commons 2023-02-09 16:52:48 -08:00
Syrus Akbary
bd55e7b2a0 Remove unused import in wasi 2023-02-09 16:46:08 -08:00
Syrus Akbary
bb3492900e Make function_env common for js/sys 2023-02-09 16:46:01 -08:00
Syrus Akbary
24253b86a7 Remove import_shared_memory 2023-02-09 21:12:03 +01:00