Coder Social home page Coder Social logo

AOT running mode about wasm-micro-runtime HOT 2 CLOSED

proydakov avatar proydakov commented on May 24, 2024 2
AOT running mode

from wasm-micro-runtime.

Comments (2)

TianlongLiang avatar TianlongLiang commented on May 24, 2024

Hello, @proydakov, if you are loading the AOT file, you must start in AOT mode, and that is the only way to use AOT mode. There is no export API to determine whether a wasm_module_inst_t module_inst is an AOT module instance or not. However, you can use get_package_type to identify whether it's a wasm file or an AOT file using:

/* read wasm/aot file into a memory buffer */
buffer = bh_read_file_to_buffer("../wasm-apps/test.file", &size);
/* whether it's wasm file */
if (get_package_type(buffer, size) == Wasm_Module_Bytecode){
...
}
/* whether it's aot file */
if (get_package_type(buffer, size) == Wasm_Module_AoT){
...
}

from wasm-micro-runtime.

proydakov avatar proydakov commented on May 24, 2024

I see:

/* Package Type */
typedef enum {
    Wasm_Module_Bytecode = 0,
    Wasm_Module_AoT,
    Package_Type_Unknown = 0xFFFF
} package_type_t;

Many Thx.

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.