damian
11/04/2026, 12:23 AMWasm/WASI: Implement Throwable.stack for non-js runtime
What's the most likely path forward for this? Is there any discussion on the wasm-wasi standards side indicating there's an intention to support a mechanism for retrieving the stack? Would kotlin add some kind of stack tracking in the compiled code?
All else failing, I'd definitely use a custom API like @UnsafeWasmApi fun setCaptureStack(f: () -> String) (such that it's called here like val stack: String = captureStack()) in the meantime. Could implement that somewhat easily with a custom host function if there is no standard. Would something like that be considered?