From ddb3113fe1670a6c2e9d4eb5d0234eed2e12683a Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Sat, 9 Nov 2024 01:52:32 +0900 Subject: [PATCH] feat: allow custom weval bin This commit enables specifying a custom `weval` binary to use when performing AOT. Signed-off-by: Victor Adossi --- src/cmd/componentize.js | 1 + src/jco.js | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cmd/componentize.js b/src/cmd/componentize.js index 318d961d0..3890a09bc 100644 --- a/src/cmd/componentize.js +++ b/src/cmd/componentize.js @@ -10,6 +10,7 @@ export async function componentize (jsSource, opts) { const source = await readFile(jsSource, 'utf8'); const { component } = await componentizeFn(source, { enableAot: opts.aot, + wevalBin: opts.wevalBin, sourceName: basename(jsSource), witPath: resolve(opts.wit), worldName: opts.worldName, diff --git a/src/jco.js b/src/jco.js index 7809f1453..99ef7cde6 100755 --- a/src/jco.js +++ b/src/jco.js @@ -34,6 +34,7 @@ program.command('componentize') .requiredOption('-w, --wit ', 'WIT path to build with') .option('-n, --world-name ', 'WIT world to build') .option('--aot', 'Enable Weval AOT compilation of JS') + .option('--weval-bin ', 'Specify a custom weval binary to use') .addOption(new Option('-d, --disable ', 'disable WASI features').choices(['clocks', 'http', 'random', 'stdio', 'all'])) // .addOption(new Option('-e, --enable ', 'enable WASI features').choices(['http'])) .option('--preview2-adapter ', 'provide a custom preview2 adapter path')