| 2000 | // >>>>>>>> WasmEdge loader functions >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> |
| 2001 | |
| 2002 | WASMEDGE_CAPI_EXPORT WasmEdge_LoaderContext * |
| 2003 | WasmEdge_LoaderCreate(const WasmEdge_ConfigureContext *ConfCxt) noexcept { |
| 2004 | try { |
| 2005 | if (ConfCxt) { |
| 2006 | return toLoaderCxt(new WasmEdge::Loader::Loader( |
| 2007 | ConfCxt->Conf, &WasmEdge::Executor::Executor::Intrinsics)); |
| 2008 | } else { |
| 2009 | return toLoaderCxt(new WasmEdge::Loader::Loader( |
| 2010 | WasmEdge::Configure(), &WasmEdge::Executor::Executor::Intrinsics)); |
| 2011 | } |
| 2012 | } catch (...) { |
| 2013 | handleCAPIError(); |
| 2014 | return nullptr; |
| 2015 | } |
| 2016 | } |
| 2017 | |
| 2018 | WASMEDGE_CAPI_EXPORT WasmEdge_Result WasmEdge_LoaderParseFromFile( |
| 2019 | WasmEdge_LoaderContext *Cxt, WasmEdge_ASTModuleContext **Module, |