Conversation
|
@bnason-nf The aot file can only be executed with AOT mode, and whether an input buffer is an AOT file can be detected by the API exported in wasm_export.h: wasm-micro-runtime/core/iwasm/include/wasm_export.h Lines 419 to 420 in 1f94cd4 so we didn't add the AOT mode in the enum. Not sure whether it is good to you? |
Thanks @wenyongh, I hadn't noticed that API, I could use it if needed, but I made a new API in #3600 that is slightly better, since it doesn't require me to have the module data and doesn't do any extra memory comparison to get information it already knows. I hope it's ok with you. Also, as a side note, the name of get_package_type() seems inconsistent with the rest of the APIs, maybe it would be nice to change in the future (even though that would be a breaking change). |
This adds an enum to RunningMode to be able to determine if a module instance is using AOT. I'm not sure this is the best solution for that, if there's a better way please let me know.