| 78 | } |
| 79 | |
| 80 | static std::optional<std::filesystem::path> extend(std::filesystem::path module_path){ |
| 81 | if(std::filesystem::exists(module_path)){ |
| 82 | return module_path; |
| 83 | } |
| 84 | // .wasm |
| 85 | module_path.replace_extension(module_path.extension().string() + ".wasm"); |
| 86 | if(std::filesystem::exists(module_path)){ |
| 87 | return module_path; |
| 88 | } |
| 89 | return std::nullopt; |
| 90 | } |
| 91 | |
| 92 | std::filesystem::path ModuleQueue::resolve(std::string module_name, std::filesystem::path parent){ |
| 93 | // Exact match |