From bc1c9b8bbcbc9a5bc607849a539b26d4ee8996bb Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Thu, 1 Aug 2024 10:38:27 -0700 Subject: [PATCH] Remove error constructor It should not be possible to construct an `error` from WebAssembly's guest side. This isn't really useful to users (what can they do with it?) and thus extends the API surface unnecessarily. This change removes the `error` constructor, expecting that all wasi-nn errors will be constructed on the host side. --- ml.md | 10 ---------- wit/wasi-nn.wit | 2 -- 2 files changed, 12 deletions(-) diff --git a/ml.md b/ml.md index bce656f..f230010 100644 --- a/ml.md +++ b/ml.md @@ -138,16 +138,6 @@ e.g., cannot access a hardware feature requested

resource error


Functions

-

[constructor]error: func

-
Params
- -
Return values
-

[method]error.code: func

Return the error code.

Params
diff --git a/wit/wasi-nn.wit b/wit/wasi-nn.wit index 872e8cd..cb891a7 100644 --- a/wit/wasi-nn.wit +++ b/wit/wasi-nn.wit @@ -157,8 +157,6 @@ interface errors { } resource error { - constructor(code: error-code, data: string); - /// Return the error code. code: func() -> error-code;