Skip to content
Draft
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
df08965
First stage
syrusakbary Nov 9, 2025
4b8b327
Sys implementation of the async functions
syrusakbary Nov 9, 2025
b392a97
Added example
syrusakbary Nov 9, 2025
e8c1efd
Make first iteration
syrusakbary Nov 9, 2025
cdb474c
Added support for async typed func
syrusakbary Nov 9, 2025
96ebd62
Added basic jsapi
syrusakbary Nov 10, 2025
87df386
Update jspi test to actually suspend
Arshia001 Nov 10, 2025
d85f3a3
Guard against improper use of nested call_async
Arshia001 Nov 10, 2025
ab86057
* Support nested coroutines suspending out of order
Arshia001 Nov 12, 2025
b19c393
Simplify the async runtime state to just a stack of context pointers
Arshia001 Nov 12, 2025
a4f9896
Added typed function implementation
syrusakbary Nov 10, 2025
8473345
Remove a bunch of unused code
Arshia001 Nov 14, 2025
9fcde4b
WIP: Rework store refs, sync function calls now work
Arshia001 Nov 18, 2025
021ae2d
WIP: fix doctests
Arshia001 Nov 18, 2025
4ced3be
Rework Function::call_async and Function::new_async w.r.t the new Sto…
Arshia001 Nov 20, 2025
50d5b04
Add simple greenthread test
zebreus Nov 11, 2025
40b47ec
Make simple greenthread example use typed functions
zebreus Nov 14, 2025
cdc80fd
Add repro for a segfault with greenthreads
zebreus Nov 20, 2025
2d6f457
Update simple-greenthread test w.r.t. new API
Arshia001 Nov 20, 2025
36c1fad
Fix not crashing greenthread test
zebreus Nov 21, 2025
fb77c93
Restrict concurrent executions against the same store to a single thread
Arshia001 Nov 21, 2025
b82c860
Fix build of wasmer-compiler crate without the compiler feature
Arshia001 Nov 24, 2025
ea29fe6
Acquire only transient store context refs on the WASM stack, since de…
Arshia001 Nov 24, 2025
a6dad39
use __builtin_trap instead of a bad function pointer in the WASIX vfo…
Arshia001 Nov 25, 2025
d909833
Restore Store to its previous implementation, separate new impl out i…
Arshia001 Nov 26, 2025
1dd7a64
Get API crate building again!
Arshia001 Nov 26, 2025
c74678f
WIP: update API tests
Arshia001 Nov 26, 2025
ad785b6
Update comments, undo unwanted changes from previous version of the code
Arshia001 Nov 27, 2025
b02a4fd
Restore ability to call non-suspending async imports in sync contexts…
Arshia001 Nov 27, 2025
174a5c7
Add read() and write() methods to StoreAsync, fix greenthread test
Arshia001 Nov 27, 2025
f43966e
Add `AsStoreRef::as_store_async`
Arshia001 Nov 28, 2025
1956e0f
Fix lint errors
Arshia001 Nov 28, 2025
bb8cb84
Because @zebreus had a misconception about what Function::call_async …
Arshia001 Nov 28, 2025
e1f7ec3
* Disallow recursive coroutines
Arshia001 Nov 29, 2025
3618a23
* Disallow taking references to the store context in async imports
Arshia001 Nov 29, 2025
55eaa60
Merge remote-tracking branch 'origin/main' into async-api-concurrent-…
Arshia001 Nov 29, 2025
888801b
oopsie!
Arshia001 Nov 29, 2025
2a6cdb8
Update and fix lints in other backends
Arshia001 Dec 1, 2025
3ed7a1e
* Add experimental-async feature flag to API crate
Arshia001 Dec 1, 2025
b909de9
Apply review comments
Arshia001 Dec 1, 2025
4f1f27e
Put the entire Box<StoreObjects> in the async store's RW-lock because…
Arshia001 Dec 1, 2025
a165cac
Prevent async functions from returning double-wrapped RuntimeError
Arshia001 Dec 2, 2025
663111c
Fix sync imports calling code that calls async imports in an async co…
Arshia001 Dec 2, 2025
f9adac8
Add AsyncFunctionEnvHandleMut::as_function_env_mut
Arshia001 Dec 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ tokio = { version = "1.39", features = [
"macros",
], optional = true }
crossbeam-queue = "0.3.8"
async-lock.workspace = true

[workspace]
members = [
Expand Down Expand Up @@ -125,6 +126,7 @@ smallvec = "1.6"
region = "3.0"
once_cell = "1.17.1"
num_enum = "0.7.3"
corosensei = "0.3.0"
dashmap = "6.0.1"
http = "1.0.0"
hyper = "1"
Expand Down Expand Up @@ -174,7 +176,8 @@ clap = { version = "=4.5.50" }
clap_builder = { version = "=4.5.50" }
clap_derive = { version = "=4.5.49" }
clap_lex = { version = "=0.7.6" }
fs_extra = {version = "1.3.0"}
fs_extra = { version = "1.3.0" }
async-lock = { version = "=3.4.1" }

[build-dependencies]
test-generator = { path = "tests/lib/test-generator" }
Expand Down
6 changes: 5 additions & 1 deletion lib/api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ loupe = { workspace = true, optional = true, features = [
] }
paste = "1.0.15"
derive_more = { workspace = true, features = ["from", "debug"] }
async-lock.workspace = true

# Dependencies and Development Dependencies for `sys`.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand All @@ -60,6 +61,7 @@ wasmer-compiler = { path = "../compiler", version = "=6.1.0", optional = true }
wasmer-derive = { path = "../derive", version = "=6.1.0" }
wasmer-types = { path = "../types", version = "=6.1.0" }
target-lexicon = { workspace = true, default-features = false }
corosensei = { workspace = true, optional = true }
# - Optional dependencies for `sys`.
wasmer-compiler-singlepass = { path = "../compiler-singlepass", version = "=6.1.0", optional = true }
wasmer-compiler-cranelift = { path = "../compiler-cranelift", version = "=6.1.0", optional = true }
Expand All @@ -79,6 +81,8 @@ wat = "1.0"
tempfile.workspace = true
anyhow.workspace = true
macro-wasmer-universal-test = { version = "6.1.0", path = "./macro-wasmer-universal-test" }
futures = "0.3"
tokio = { workspace = true, features = ["full"] }

# Dependencies and Develoment Dependencies for `js`.
[target.'cfg(target_arch = "wasm32")'.dependencies]
Expand Down Expand Up @@ -125,7 +129,7 @@ artifact-size = [
]

# Features for `sys`.
sys = ["std", "dep:wasmer-vm", "dep:wasmer-compiler"]
sys = ["std", "dep:wasmer-vm", "dep:wasmer-compiler", "dep:corosensei"]
sys-default = ["sys", "wat", "cranelift"]

# - Compilers.
Expand Down
Loading
Loading