Giter Site home page Giter Site logo

Comments (3)

wenyongh avatar wenyongh commented on May 28, 2024

Hi, "wasi proc exit" is a normal behavior and the exception will be cleared by runtime before wasi app main function returns.

WASMModuleInstance *inst = (WASMModuleInstance *)module_inst;
if (!ret && strstr(inst->cur_exception, wasi_proc_exit_exception)) {
inst->cur_exception[0] = 0;
ret = true;
}
return ret;

Please use wasm_runtime_get_exception to check whether there was exception thrown.

from wasm-micro-runtime.

nchamzn avatar nchamzn commented on May 28, 2024

Hi, sorry - I meant as an embedder so not using iwasm. I think at the moment if we call a wasm function then we are required to check for an exception and then ignore it if it matches "Exception: wasi proc exit"?

from wasm-micro-runtime.

wenyongh avatar wenyongh commented on May 28, 2024

Hi, yes, the "wasi proc exit" is only thrown when the wasm app is a wasi module, and it is cleared by runtime if the function to call is "_start" function and developer uses wasm_application_execute_main to call it. If developer calls other functions or calls "_start" function without using wasm_application_execute_main, normally he should ignore the "wasi proc exit" by himself.

from wasm-micro-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.