Continuing along with work to support Apple Silicon, we need to be able to extract multiple files that are in subdirectories when downloading wasm-opt. This is because wasm-opt needs to load ../lib/libbinaryen.dylib.
What this PR does
It changes download to accept a parent directory and a collection of subpaths that may contain subdirectories. This will enable things like specifying a parent directory of wasm-opt and subpaths bin/wasm-opt and lib/libbinaryen.dylib when downloading wasm-opt.
Why this change
I wanted to isolate the parts of the stack being changed as opposed to propagating subpaths all the way through from get_wasm_opt and get_wasm_bindgen to make the PR easier to review. I'm open to adjusting callers up the stack such that they create the collection of subpaths if that would be preferred.
Context
Continuing along with work to support Apple Silicon, we need to be able to extract multiple files that are in subdirectories when downloading
wasm-opt
. This is becausewasm-opt
needs to load../lib/libbinaryen.dylib
.What this PR does
It changes
download
to accept a parent directory and a collection of subpaths that may contain subdirectories. This will enable things like specifying a parent directory ofwasm-opt
and subpathsbin/wasm-opt
andlib/libbinaryen.dylib
when downloadingwasm-opt
.Why this change
I wanted to isolate the parts of the stack being changed as opposed to propagating subpaths all the way through from
get_wasm_opt
andget_wasm_bindgen
to make the PR easier to review. I'm open to adjusting callers up the stack such that they create the collection of subpaths if that would be preferred.