File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed
Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,19 @@ export async function parseInputs(cliInputs: string[]): Promise<ParsedInputs> {
137137 }
138138 break ;
139139 }
140+ case '--weval-bin' : {
141+ const value = cliInputs . shift ( ) ;
142+ if ( value == null ) {
143+ console . error ( 'Error: --weval-bin requires a value' ) ;
144+ process . exit ( 1 ) ;
145+ }
146+ if ( isAbsolute ( value ) ) {
147+ wevalBin = value ;
148+ } else {
149+ wevalBin = join ( process . cwd ( ) , value ) ;
150+ }
151+ break ;
152+ }
140153 case '--aot-cache' : {
141154 const value = cliInputs . shift ( ) ;
142155 if ( value == null ) {
@@ -225,6 +238,12 @@ export async function parseInputs(cliInputs: string[]): Promise<ParsedInputs> {
225238 wasmEngine = join ( __dirname , '../fastly-weval.wasm' ) ;
226239 }
227240
241+ if ( wevalBin && ! enableAOT ) {
242+ console . error (
243+ 'Warning: --weval-bin has no effect without --enable-aot, as weval is only used for AOT compilation' ,
244+ ) ;
245+ }
246+
228247 return {
229248 enableExperimentalHighResolutionTimeMethods,
230249 enableHttpCache,
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ OPTIONS:
2929 --enable-experimental-top-level-await Enable experimental top level await
3030 --enable-stack-traces Enable stack traces
3131 --exclude-sources Don't include sources in stack traces
32- --debug-intermediate-files <dir> Output intermediate files in directory
32+ --debug-intermediate-files <dir> Output intermediate files in directory
33+ --weval-bin <weval-bin> Path to the weval binary to use for AOT compilation
3334
3435ARGS:
3536 <input> The input JS script's file path [default: bin/index.js]
You can’t perform that action at this time.
0 commit comments