MCPcopy Index your code
hub / github.com/bytecodealliance/ComponentizeJS / getEnginePath

Function getEnginePath

src/componentize.js:503–513  ·  view source on GitHub ↗

Determine the correct path for the engine

(opts)

Source from the content-addressed store, hash-verified

501
502/** Determine the correct path for the engine */
503function 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 */
516async function prepWorkDir() {

Callers 1

componentizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected