======= Functions can be called before the instantiated stage. ======= Register wasm modules and host modules.
| 49 | /// ======= Functions can be called before the instantiated stage. ======= |
| 50 | /// Register wasm modules and host modules. |
| 51 | Expect<void> registerModule(std::string_view Name, |
| 52 | const std::filesystem::path &Path) { |
| 53 | std::unique_lock Lock(Mutex); |
| 54 | return unsafeRegisterModule(Name, Path); |
| 55 | } |
| 56 | Expect<void> registerModule(std::string_view Name, Span<const Byte> Code) { |
| 57 | std::unique_lock Lock(Mutex); |
| 58 | return unsafeRegisterModule(Name, Code); |