| 44 | } // namespace |
| 45 | |
| 46 | WasmEdge_ConfigureContext *createConf(const Configure &Conf) { |
| 47 | auto *Cxt = WasmEdge_ConfigureCreate(); |
| 48 | for (auto &I : ProposalList) { |
| 49 | if (!Conf.hasProposal(I)) { |
| 50 | WasmEdge_ConfigureRemoveProposal(Cxt, static_cast<WasmEdge_Proposal>(I)); |
| 51 | } else { |
| 52 | WasmEdge_ConfigureAddProposal(Cxt, static_cast<WasmEdge_Proposal>(I)); |
| 53 | } |
| 54 | } |
| 55 | return Cxt; |
| 56 | } |
| 57 | |
| 58 | ErrCode convResult(WasmEdge_Result Res) { |
| 59 | return static_cast<ErrCode::Value>(WasmEdge_ResultGetCode(Res)); |