Determine the correct path for the engine
(opts)
| 501 | |
| 502 | /** Determine the correct path for the engine */ |
| 503 | function getEnginePath(opts) { |
| 504 | if (opts.engine) { |
| 505 | return opts.engine; |
| 506 | } |
| 507 | const debugSuffix = opts?.debugBuild ? '.debug' : ''; |
| 508 | let engineBinaryRelPath = `../lib/starlingmonkey_embedding${debugSuffix}.wasm`; |
| 509 | if (opts.enableAot) { |
| 510 | engineBinaryRelPath = '../lib/starlingmonkey_embedding_weval.wasm'; |
| 511 | } |
| 512 | return fileURLToPath(new URL(engineBinaryRelPath, import.meta.url)); |
| 513 | } |
| 514 | |
| 515 | /** Prepare a work directory for use with componentization */ |
| 516 | async function prepWorkDir() { |