sdeleuze
01/26/2023, 7:16 PMsdeleuze
01/26/2023, 7:19 PMfuture
like used in https://github.com/WebAssembly/wasi-clocks/blob/main/wasi-clocks.wit.md#expiration translate to Deferred<Unit>
, Job
or something else?sdeleuze
01/26/2023, 7:23 PMfuture
is not yet written in https://github.com/WebAssembly/component-model/, I guess it maps to https://doc.rust-lang.org/std/future/trait.Future.html.Svyatoslav Kuzmich [JB]
01/26/2023, 8:23 PMfuture
or maybe examples of bindings?
From discord discussions it seems that future
and stream
are likely to be removed from preview 2
It would make sense for high-level APIs to expose it as Deferred<T>
, but it could also have some lower-level type to avoid dependency on kotlinx.coroutines. Something like what we have with Promise
in JavaScript interop, where you can convert Promise
to Deferred
and back.sdeleuze
01/26/2023, 8:35 PMsdeleuze
01/27/2023, 12:20 PMsdeleuze
02/04/2023, 10:22 AMSvyatoslav Kuzmich [JB]
02/05/2023, 8:25 PMsdeleuze
02/05/2023, 9:11 PMsdeleuze
02/12/2023, 1:50 PMSvyatoslav Kuzmich [JB]
02/12/2023, 1:59 PMSvyatoslav Kuzmich [JB]
02/12/2023, 2:20 PMwould stringref potentially impact with how WebAssembly Component Model deals with strings, or are those 2 independant (implementation detail)Mostly an implementation detail, but it would allow a sharing reference to immutable string memory without copy (which is currently always required in a linear memory-based CM ABI). But even without copy, Wasm engines would need to make sure that stringref is valid unicode string (which is not always the case with WTF-16 strings in Kotlin, JS, etc.) before passing it to other component. Hopefully, this bit of information could be cached in the stringref once computed. This is based on my assumption that CM would include stringref as a choice for CM canonical ABI, but I haven’t seen any opinions regarding stringref from CM folks yet.
sdeleuze
02/12/2023, 2:21 PM