| 2448 | } |
| 2449 | |
| 2450 | WASMEDGE_CAPI_EXPORT void |
| 2451 | WasmEdge_ModuleInstanceInitWasmEdgeProcess(const char *const *AllowedCmds, |
| 2452 | const uint32_t CmdsLen, |
| 2453 | const bool AllowAll) noexcept { |
| 2454 | using namespace std::literals::string_view_literals; |
| 2455 | if (const auto *Plugin = |
| 2456 | WasmEdge::Plugin::Plugin::find("wasmedge_process"sv)) { |
| 2457 | PO::ArgumentParser Parser; |
| 2458 | Plugin->registerOptions(Parser); |
| 2459 | Parser.set_raw_value<std::vector<std::string>>( |
| 2460 | "allow-command"sv, |
| 2461 | std::vector<std::string>(AllowedCmds, AllowedCmds + CmdsLen)); |
| 2462 | if (AllowAll) { |
| 2463 | Parser.set_raw_value("allow-command-all"sv); |
| 2464 | } |
| 2465 | } |
| 2466 | } |
| 2467 | |
| 2468 | WASMEDGE_CAPI_EXPORT WasmEdge_String WasmEdge_ModuleInstanceGetModuleName( |
| 2469 | const WasmEdge_ModuleInstanceContext *Cxt) noexcept { |
nothing calls this directly
no test coverage detected