Skip to content

Commit

Permalink
fix: Return 0 from WASI.start() on success
Browse files Browse the repository at this point in the history
This behavior is consistent with Node.js's `WASI.start()`.
https://github.com/nodejs/node/blob/v21.4.0/lib/wasi.js#L117
  • Loading branch information
kateinoigakukun committed Dec 16, 2023
1 parent c349000 commit 97987bb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/wasi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default class WASI {
this.inst = instance;
try {
instance.exports._start();
return 0;
} catch (e) {
if (e instanceof WASIProcExit) {
return e.code;
Expand Down

0 comments on commit 97987bb

Please sign in to comment.