Skip to content

Commit 0cc1d10

Browse files
committed
add comment explaining vendor.tar
Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent f2d014f commit 0cc1d10

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/hyperlight_wasm/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@ fn get_wasm_runtime_path() -> PathBuf {
4646

4747
println!("cargo::rerun-if-changed={}", tar_path.display());
4848

49+
// If the vendor.tar file exists, extract it to the OUT_DIR/vendor directory
50+
// and return the wasm_runtime directory inside it.
51+
// This is useful for vendoring the wasm_runtime crate in a release build, since crates.io
52+
// does not allow vendoring folders with Cargo.toml files (i.e., other crates).
53+
// The vendor.tar file is expected to be in the same directory as this build script.
4954
if tar_path.exists() {
5055
let out_dir = env::var_os("OUT_DIR").unwrap();
5156
let out_dir = PathBuf::from(out_dir);

0 commit comments

Comments
 (0)